How to Add Values from Combo Box to a new Table

bdemps03

New member
Local time
Today, 06:06
Joined
Apr 11, 2011
Messages
7
Hi, I am somewhat new to Access 2007.

I have a form that populates most of the data from a table and some information is typed in. This is what I have:

Vehicle # (select- controls the next 3 combo boxes)
Vin # (auto populates)
Address (auto populates)
State, City, Zip (auto populates)

Created by: (textbox)
Load #: (textbox)

I would like to add all of these records to a table called Orders by clicking a button. :confused:

Any help would be appreciated.

Thanks
 
Hmmm, you really shouldn't be storing the information in two different tables... Information in one table ID in another tables. Okay, enough of that...

Try using an APPEND query in On_Click event of the button...

Code:
DoCmd.OpenQuery "YourAPPENDQueryHere"
 
What I'm actually trying to do is look the data up in the one table(for my form) and then add all the new records to a different table, so I can run reports off the data that was selected.

Thanks
 
Well, you can run an APPEND query to any table you like so that would work. But if your goal is just to run a report on selected values then...

If your field is numeric...
Code:
DoCmd.OpenReport "YourReport", acViewPreview, , "[FieldInReport]=" & Me![FieldOnForm]

If your field is text…
Code:
DoCmd.OpenReport "YourReport", acViewPreview, , "[FieldInReport]='" & Me![FieldOnForm] & "'"

...will work.
 

Users who are viewing this thread

Back
Top Bottom