How to open a blank form for adding a new record

G

Guest

Hello,

I have a form for adding/viewing employee records. I can open the form,
view records and using the navigation button, add a new record just fine.
However, I'd like to open the form using a command button so that all fields
are blank and a new record can immediately been added without having to use
the navigation button. Can anyone help me figure out how to do this?

TIA,
Rich
 
F

fredg

Hello,

I have a form for adding/viewing employee records. I can open the form,
view records and using the navigation button, add a new record just fine.
However, I'd like to open the form using a command button so that all fields
are blank and a new record can immediately been added without having to use
the navigation button. Can anyone help me figure out how to do this?

TIA,
Rich

Code the command button's Click event:
DoCmd.OpenForm "FormName", , , , acFormAdd

Change "FormName" to whatever the actual name of the form to be opened
is.
 
G

Guest

Perfect!!!

Thanks Fred!!!





fredg said:
Code the command button's Click event:
DoCmd.OpenForm "FormName", , , , acFormAdd

Change "FormName" to whatever the actual name of the form to be opened
is.
 

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

Top