Clear a form on entry

N

Nancy

How does one clear all of the fields when entering a form? I have two forms
(one query and one data entry) and the user does not want to see the previous
results.

I attempted to use the forms on open and on load events to set the field to
null (field.value = NULL) but it did not like that. Is there anything else I
can do?

Thanks for all of your help!
 
D

Daniel

For the form in question simply set the 'Data Entry' property to Yes. This
way when your user opens the form it will be on a new blank record.

You can also blank each control by code such as
Me.ControlName=""

Daniel P
 
O

Ofer Cohen

Three ways to open the form for data entry, empty form

1. Set the form DataEntry Property to Yes
====================================
2. On the On open form command line, specify that it for data entry
docmd.OpenForm "FormName",,,,acFormAdd
====================================
3. On the OnLoad event of the form, insert the code to move to a new record
DoCmd.GoToRecord , , acNewRec
 
N

Nancy

Thank you Ofer, that worked perfect.

Ofer Cohen said:
Three ways to open the form for data entry, empty form

1. Set the form DataEntry Property to Yes
====================================
2. On the On open form command line, specify that it for data entry
docmd.OpenForm "FormName",,,,acFormAdd
====================================
3. On the OnLoad event of the form, insert the code to move to a new record
DoCmd.GoToRecord , , acNewRec
 
N

Nancy

Thank you Daniel, it worked perfectly.

Daniel said:
For the form in question simply set the 'Data Entry' property to Yes. This
way when your user opens the form it will be on a new blank record.

You can also blank each control by code such as
Me.ControlName=""

Daniel P
 
Top