syntax to add new record to table in VBA

raychoy2k

Registered User.
Local time
Today, 15:59
Joined
Feb 24, 2003
Messages
29
Hello,

I was wondering how do I add a new record to a table and fill in the field values in VBA?

Any help would be greatly appreciated.
 
Here's an example from Access help, slightly modified:

Dim dbs As Database
Set dbs = CurrentDB()
dbs.Execute " INSERT INTO Employees " _
& "(FirstName,LastName, Title) VALUES " _
& "('Harry', 'Washington', 'Trainee');"
dbs.Close

Hope this helps,
 

Users who are viewing this thread

Back
Top Bottom