May 26, 200520 yr 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???
May 26, 200520 yr 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
May 27, 200520 yr Author Worked perfect!! Quick question though, why does it not work without the 1st IF statement?
May 27, 200520 yr 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
Create an account or sign in to comment