Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form fields to clear on exit

Status
Not open for further replies.

JamesMack

Technical User
Feb 13, 2001
59
GB
With gords help I have managed to produce a form which by the use of combo's and querys allows me to populate the underlying tables without repeating common data record after record.
However, currently the form retains the inputted data each time I open it to introduce more data subsequently producing a larger and larger form (mirroring the underlying table).
Any ideas on how I might find a 'clear' form on re-opening?
 


I'm not quite sure what you want to do. If you want to retain the records that you previously entered but on re-open you want to have a new record to enter data use a macro. Use a RunCommand in the Form Open Event. The RunCommand you can use is the "RecordGotoNew". When you open the form it starts a clean record.

If you want to Delete the record you entered use the RunCommand in the Form Close Event called "DeleteRecord" which will delete the record when you close.
BTW, if you use the DeleteRecord it is advised to save your form to a new name before running, since I'm not quite sure any of the things I've said above are what you want to do I wouldn't want to be responsible for deleting important data.

Hope this Helps,

Chris
 
Thanks Chris,
I'm just off to work now to try out your idea!
Have a good day
James.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top