Start a new record when opening form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a minor issue I was hoping to get some help with. On my databases, I
would like to set up the forms so that when a user opens the form it will
automatically open on a new record instead of always opening on record #1 and
then having to click the new record button. I would appreciate any help.

Thanks Folks!!
 
Doug_C said:
Hello,

I have a minor issue I was hoping to get some help with. On my
databases, I would like to set up the forms so that when a user opens
the form it will automatically open on a new record instead of always
opening on record #1 and then having to click the new record button.
I would appreciate any help.

Thanks Folks!!

You can either set the DataEntry property of the form to True or use the
acFormAdd argument of the OpenForm method.

DoCmd.OpenForm "FormName",,,, acFormAdd
 
Hi Rick,

It did not work. I tried the code because using the Data Entry "No", the
user will not be able to do a search.

I put the code in the form "On Open" event and nothing happens. I am sure I
messed up. If so, could you please be more precise as to the locations of
where this piece of code would go?

Thanks!!
 
Doug_C said:
Hi Rick,

It did not work. I tried the code because using the Data Entry "No",
the user will not be able to do a search.

All they have to do is "Remove All Filters" and the DataEntry behavior is
removed as well.
I put the code in the form "On Open" event and nothing happens. I am
sure I messed up. If so, could you please be more precise as to the
locations of where this piece of code would go?

Did you put it in the OnOpen box of the property sheet? That's not how event
code works. You put "[Event Procedure]" in the property, press the build [...]
button to the right which will take you to the code window and that is where the
code goes.
 
Back
Top