Command buttton code for addding data in a table

G

Geo

I have a 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
 
K

Ken Snell [MVP]

Easiest way is to have the form's recordsource be a query that contains all
the fields that are to receive the values, and bind the controls to those
fields.

Otherwise, you'll need to write VBA code to (1) run an append query that
uses the form's controls as the source of the data to be appended, or (2)
create an append query that incorporates the values from the form's controls
into the SQL statement and then run the query.
 
Top