osiris612mb Posted May 26, 2005 Posted May 26, 2005 Ok since everyone can answer most of my quesitons I hope this one is simple also. I am trying to do a find where two fields are user entered but the second field has to be a less than or equal to ( >= or ?) i know how to specify finds but I can't put that into the find so if the user enters 4 it will automatically find ?4. I could enter ? into the field first and then have the user enter in the number, but I work with some of the most computer illiterate people around, and want to keep it simple stupid. Can I do this any other way then entering in ? and formatting it so the user can't see it???
-Queue- Posted May 26, 2005 Posted May 26, 2005 Use a script like Allow User Abort [Off] Set Error Capture [On] Enter Find Mode [Pause] If [not IsEmpty(secondField)] Set Field [secondField; "<=" & secondField] End If Perform Find [ ] If [not Get(FoundCount)] Show Custom Dialog ["No records were found that meet the given criteria."] Show All Records End If
osiris612mb Posted May 27, 2005 Author Posted May 27, 2005 Worked perfect!! Quick question though, why does it not work without the 1st IF statement?
-Queue- Posted May 27, 2005 Posted May 27, 2005 The If statement checks that the user has entered a value into secondField. If there is no value, then you do not want to search for <= , so the Set Field step is ignored. It should work without the If, though, if you can assume that secondField will always have a value entered during the find. Note: violin player = N U L L
Recommended Posts
This topic is 7123 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