Add New Record cmd

  • Thread starter Thread starter Little Penny
  • Start date Start date
L

Little Penny

I want to create a command button to add a new record. What is the command statement


Thanks
 
Little Penny,

There is no "command statement" as such for this. How to proceed will
depend a lot on the details of what you want to achieve, where the code
will run from, which table the new record is going into, and how the
data for the new record will be defined. Can you please post back with
some more information? Thanks.
 
Thanks for you reply I have a form for UserInfo and wanted a cmd button on the form the will do exactly what the new record button does at bottom of
form. This form adds a new record to the User Info table. Trying to make form more user friendly.
 
Little Penny,

Ah, ok. Well, what you are really talking about here is going to a
blank record on the form, with the option for you to create a new record
by entering data. A new record in the UserInfo table is not added.

Use this code on the Click event of the command button...
DoCmd.GoToRecord , , acNewRec
 
Back
Top