Opening a form

  • Thread starter Thread starter Simon
  • Start date Start date
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
 
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
 
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
 
Simon,
On the buttons OnClick event...
DoCmd.OpenForm "YourFormName"
DoCmd.GoToRecord , , acNewRec
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top