ms access - Reference a field on a form within a query using SQL -


I have an Access 2007 database that will be the Housing Tables, which refers to the bill of material for many products. Mainly, I want a user to choose one of the products - fine, easy. Now, after selecting my product from a dropdown, I want to run two questions while pressing a button. The first query is a simple delete query to delete all the information on a table. The second query is that I am facing my problem with my SQL syntax, I want to add to the information table from a stable table where the deleted queries just removed everything from the

Now, each table that Bills the content for each product that is labeled with the product name. So I want to go to the dropdown ( combo0 ) as the reference point of the table name in the FROM section inside the SQL string. The code is as follows: Select INSERT in

  tblTempSassyInfo (concat, TableName, Pattern, Partnumber, [L / R], Feedersis, Lineboard, SASSYname, Rawboard) Table name & amp; Patanum & amp; Partnumber, table name, address name, partnumber, [l / r], feeder size, minimalboard, sassim, rogerboard fom [form]! [Dashboard]! [Combo 0];  

So you can see where I am trying to refer to the product name in the dropdown on the form as the name of where. Please tell me if it is possible

"Please tell me that this is possible."

Access is not possible with SQL.

The DB engine can only accept the actual table name --- it is not equipped to search for the name of the table nor to accept a form control in order to get the table name Any other type of parameters.

You can change the query to include the value of your combo as the table name, and then you can rewrite SQL from the updated version of the combo.

  "SELECT * FROM [" & amp; [Forms] from [Dashboard]! [Combo 0] & amp; "]"  

A similar approach can keep access accessible, but this is not the best fit for your application.


Comments