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

  • Thread starter Thread starter Geo
  • Start date Start date
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top