Opening a form

S

Simon

When i open a form how do i make the button open a blank form and not a
form with data in it


Thanks
 
T

TonyT

Set Data Entry = Yes in the form properties or do it programatically with
DoCmd.OpenForm "Form Name", , , , acFormAdd in the buttons On_click event

TonyT
 
L

Larry Linson

Simon said:
When i open a form how do i make the
button open a blank form and not a
form with data in it

You can set the Data Entry property of the Form that is to be opened to Yes.

Or you can set the Datamode argument of the DoCmd.OpenForm statement, which
will have been generated for you by the Wizard if you used the Wizard when
creating the button, (the 5th argument if I haven't miscounted) to
acFormAdd.

Note: The second of these options did not even require going to Help, just
typing in the DoCmd.OpenForm and seeing what options were offered by
Intellisense.

Larry Linson
Microsoft Access MVP
 
A

Al Campagna

Simon,
On the buttons OnClick event...
DoCmd.OpenForm "YourFormName"
DoCmd.GoToRecord , , acNewRec
 
Top