Clear form on open

JLS04

Registered User.
Local time
Today, 18:47
Joined
Aug 24, 2005
Messages
10
I've developed a form where users enter and select information that will be stored in another table. Currently when I open the form, the information I entered from the previous use is still in the text and combo boxes. Is there a way to clear this information when the form is opened (so all boxes are blank)?

Thanks!
 
Are the text and combo boxes bound to any tables/queries? If so, clearing the forms would also clear those entries in the table/query, if not, you could either set the default value in the properties to "" or use VBA, if you use vba just put this code in the OnLoad event changing it for each text/combo box you have.

text1.value = ""
combo1.value = ""
 
The combo and text boxes are bound to another table where information will be stored. Is there a way to do this with a bound table?
 
are bound to another table
What do you mean by "another". A form is bound to its RecordSource which may be a table or a query of one or more tables. "Another" does not compute in this context.

If you only want to use the form for data entry and not for viewing existing data, change the form's DataEntry property from No to Yes.
 
In the forms OnLoad event enter the following code:
The form will open blank all the time.

Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
End Sub
 
Thanks applevacross! That worked like a charm!!!!
 

Users who are viewing this thread

Back
Top Bottom