Command buttton code for addding data in an Access 2002XP table

G

Geo

I have an MS Access 2002XP form with 6 combo boxes with values selected from
a query and 1
from a table and 4 text boxes with values I will introduce. How can I, using
a command button with some code, add these values to a table?

I would apreciate any help.
Thank you!
Geo
 
D

Douglas J. Steele

You sure you asked this in enough groups?

There are several ways to add values to tables.

You can construct the SQL for an Insert query in VBA, and then run the
query. Check the Help file for the syntax under INSERT INTO, and then use
either DoCmd.RunSQL or, preferably, the Execute method of the Database
object.

You can open a recordset (either DAO or ADO) and use the AddNew method to
allow you to add new records. Look up CreateRecordset (for DAO) or the Open
method of the Recordset object (for ADO), as well as the AddNew method for
either.
 
Top