[RESOLVED] ms access 2000 - query to write info to 2 tables
I am trying to do a query and it is not working out right. I have 4 tables. 2 tables hold static data for the user to select from on the form. I want to split this data and instead of it writing to one table which it is now. I want it to write to 2 different tables. 1 from one table and one from the other. So two tables as control source and 2 tables as Row source. I have tried to do this in a query but it's not right. I think I may be doing my Relationships wrong. Can someone help?
Re: ms access 2000 - query to write info to 2 tables
http://www.vbforums.com/
try explaining that one again... im confused
1 Attachment(s)
Re: ms access 2000 - query to write info to 2 tables
Here is a portion of the data base.
I am wanting
Form write 2 to tables to be able to read from tables TblCabin and TblVendor and write the data that is selected to TblwrCabinName and TblWrVendorName
Change the file to .mdb to convert it back.
Re: ms access 2000 - query to write info to 2 tables
still confusing.. u want the user to be able to pick 1 from each table.. then
write the choices to TblWr tables with linkable ID's??
Re: ms access 2000 - query to write info to 2 tables
I think what he wants is an INSERT query that inserts data to two different tables.
Re: ms access 2000 - query to write info to 2 tables
The id's doesnt matter they are there just to give each a unique identifier.
Re: ms access 2000 - query to write info to 2 tables
I really dont know any other way to explain what I am needing :(
Re: ms access 2000 - query to write info to 2 tables
well i think u are making it too complicated...
Create a form
ad a combobox.. tell the wizard: look up values, pick the table, pick the field
Repeat and pick the other table and field...
Add a command button
command button code
Docmd.RunSQL "INSERT INTO TblwrCabinName (Cabinname) VALUES ('" & combobox1.value & "')"
Docmd.RunSQL "INSERT INTO TblWrvandorname (Vendorname) VALUES ('" & combobox2.value & "')"