January 6, 200521 yr Hi, I have a button that executes a script that will bring up a dialogue box to enter a couple of search variables... then it performs the search, goes to preview mode, and prints out the report. Yeah! The problem is that what if the search yields no results? Then it continues the script going to preview mode where nothing is displayed and unfortunately the user thinks there is something wrong and they want to close it down. How do I script for errors so if the search yields no results, then i could put up another dialogue box...? Thanks Vandy
January 6, 200521 yr Hi Vandy, here is something I have been using and has been working great (so far) ...a bunch of steps to perform the find if(Status(CurrentFoundCount)<0) show message "no records meet your request" ---a bunch of steps like perform another script of exit or...whatever else ---do what you do now EndIf
January 6, 200521 yr Author Hi, where do I place this code in the Scriptmaker? I don't really see an area to place it in.
January 6, 200521 yr Author And it's coming up with a message that the "Status" function cannot be found.
January 6, 200521 yr "Status" is for previous versions. Use Get(FoundCount) after the Find and trap 0 results (exit script).
Create an account or sign in to comment