use add record button to add data

louis-m

Registered User.
Local time
Today, 17:19
Joined
Mar 5, 2008
Messages
24
hi,
how would i go about inserting the results of what is showing in say combo box A & combo box B into a new table?
i have a add button on the form but can't see how to use it.
do i have to add code to the click event like:

INSERT INTO newtable (field1, field2) FROM myform (comboA, comboB)

i'm guessing at the above obviously but anything to point me in the right direction would be appreciated.

thanks
louis
 
If you add a command button from the toolbox (with the wizard enabled), the wizard will sort this out for you automatically. Under the wizard categories, select "Record Operations", and under Actions select "Save Record".

Hope this is what your looking for.
 
hi, thanks for your reply but its not as simple as i probably explained.
i have a form that shows 2 combo boxes which do their lookups from a products table.
so if a user selects from those combo boxes:
combo box1[product] ITEM A & combo box2[size] ITEM B

i then need a button underneath called PLACE ORDER so when the user presses it, the results of the combo boxes are added to a seperate table called ORDERS [product] [size]

i think the save record button has to have some form of sql statement which does an "INSERT TO orders" function

probably simple but i'm new to all this!
 
Make sure the forms properties for 'record source' is set to ORDERS, and the 'record source' of each combo box is set to 'product' and 'size'. I'm pretty certain thats all you need.

You don't have to do anything with the save button.
 

Users who are viewing this thread

Back
Top Bottom