page19 Posted March 25, 2020 Share Posted March 25, 2020 Hi, I'm working on a FM database for a friend and I've reached a point where I'm stumped as how to do it so was just wondering if some kind person can help me please. What I would like to do is have the database, upon opening, automatically find records based on a date field that is 30 days in the future. For example, if the current date is 01/01/2020 then I would like to create a script that automatically finds all records that have the date 31/01/2020 in a certain field and have a simplified report card (with just 2 or 3 details from the main database) show up displaying which records they are. Any help will be much appreciated. Thanks. Link to comment Share on other sites More sharing options...
Steve Martino Posted March 25, 2020 Share Posted March 25, 2020 Set a variable, put that into the find. Set Error Capture [On] Set Variable [$date; Value: ">" & get(currentdate)+30] Enter Find Mode [Pause Off] Set Field [YourTable::YourDateField; $date] Perform Find [ ] Don't forget to trap for errors. Link to comment Share on other sites More sharing options...
page19 Posted March 25, 2020 Author Share Posted March 25, 2020 Thanks, however for SET FIELD it's asking for an operator in the space before $date . Please advise. Thanks Link to comment Share on other sites More sharing options...
Steve Martino Posted March 25, 2020 Share Posted March 25, 2020 Show me a screenshot, as I don't see it happening in my file. Link to comment Share on other sites More sharing options...
page19 Posted March 26, 2020 Author Share Posted March 26, 2020 Link to comment Share on other sites More sharing options...
Steve Martino Posted March 26, 2020 Share Posted March 26, 2020 Your using set field incorrectly. There are 2 dialogs. The first one 'Specify Target Field' you select the field, presumably 'Contacts::Accounts Date'. The second one 'Calculated Result' you just put in the variable by itself $date second one Link to comment Share on other sites More sharing options...
page19 Posted March 26, 2020 Author Share Posted March 26, 2020 Ahh, that's got it. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts