lonesomejubilee Posted January 6, 2005 Posted January 6, 2005 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
Zeina Posted January 6, 2005 Posted January 6, 2005 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
lonesomejubilee Posted January 6, 2005 Author Posted January 6, 2005 Hi, where do I place this code in the Scriptmaker? I don't really see an area to place it in.
lonesomejubilee Posted January 6, 2005 Author Posted January 6, 2005 And it's coming up with a message that the "Status" function cannot be found.
transpower Posted January 6, 2005 Posted January 6, 2005 "Status" is for previous versions. Use Get(FoundCount) after the Find and trap 0 results (exit script).
Zeina Posted January 6, 2005 Posted January 6, 2005 yes sorry, in version 7 all the "status" have been changed to "get" Z
Recommended Posts
This topic is 7264 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now