I have an Access 2007 database that will contain tables that relate to the bill of materials for several products. In the main form, I want the user to be able to choose one of the products - good, easy. Now I want the two queries to be launched as soon as they click the button after selecting their product from the drop-down list. The first query is a simple delete request to remove all information from the table. The second query is where I had a problem with SQL syntax. I want the information from the static table to be added to the table where the delete request just deleted everything.
Now each table in which the bill of material for each product is stored is marked with the name of the product. So I want a dropdown list ( combo0) to be the reference point for the table name in FROMn in the SQL string. The code is as follows:
INSERT INTO tblTempSassyInfo (Concat, TableName, AddressName, PartNumber, [L/R], FeederSize, QtyPerBoard, SASSYname, RawBoard)
SELECT TableName & AddressName & PartNumber, TableName, AddressName, PartNumber, [L/R], FeederSize, QtyPerBoard, SassyName, RawBoard
FROM [FORMS]![DASHBOARD]![Combo0];
So, you can see where I am trying to refer to the product name in the form drop-down as the table name. Please let me know if possible.
source
share