Adding a new record with certain fields filled

TomJamieson

Registered User.
Local time
Today, 14:07
Joined
Jun 8, 2006
Messages
50
I want to have a button that will create a new record in my table, and populate a couple of the fields with certain data. Is there a way I can do this using vba?
 
On the click event of your button, use:

DoCmd.GoToRecord , , acNewRec

to go to a new record. Then you can use:

me.txtField1 = "Value1"
me.txtField2 = "Value2"

and so on to set values of certain fields.
 

Users who are viewing this thread

Back
Top Bottom