July 23, 200421 yr I have 4 temporary entry fields that I would like to automatically delete contents when the database is closed. I tried a loop and set field commands but it takes way too long (I have 55000 records). I tried making 4 subscripts to be used within a main script. Each subscripts searches one of the temporary entry fields for any contents and then uses replace contents "" to clear it out. This works fine except for when there is nothing in the field to find and the "no records match this request" dialog box appears and you have to click continue. This is no good because I don't want people to have to babysit the database while it's closing. Any ideas? Thanks
July 23, 200421 yr Set Error Capture [On] at the beginning of your main script. Then you can trap for no records found If [not Status(CurrentFoundCount)], then Exit Script to abort the Replace step and continue to the next portion of your main script.
July 23, 200421 yr Can you use globals instead of regular data fields? Globals are typically used for temporary use in this way, and you wouldn't have to loop through to clear them out.
July 24, 200421 yr Author Thanks Queue- that'll do it (duh)! Ender- I did try that- but thought it might be confusing to the user... they create a new record, enter data in the temp entry field (ex. Adams, Ansel)which looks up that artist's ID to store... then they go to create another new record and the temp entry field still says Adams, Ansel. Even though it doesn't matter... Is there a simple way to get the temp entry field to clear out automatically after the ID is looked up? Thanks both-
July 24, 200421 yr Is there a simple way to get the temp entry field to clear out automatically after the ID is looked up? Sure, use a button with a script to trigger the confirmation of the name and entry of ID process. Then have the last step in the script be to clear the global data entry fields.
July 25, 200421 yr You should probably re-examine why you are using all these temp fields in the first place and figure out a solution that uses globals.
Create an account or sign in to comment