Running an SQL statement with combobox values (1 Viewer)

bobbybeers

Registered User.
Local time
Today, 03:02
Joined
Mar 14, 2013
Messages
17
Hello all:)
I have a form that has a combobox with table names in it. I want to execute a very complicated SQL statement but I want to put the table name (from the combobox) into the SQL statement. I'm planning on making a button to do this, but I don't know how to put the SQL statement in VBS which would use the combobox value as the table name in the SQL statement. Anyone ever done anything like this before??

Thanks
 

pr2-eugin

Super Moderator
Local time
Today, 10:02
Joined
Nov 30, 2011
Messages
8,494
I have done something similar.. Where you stuck at? What is that you are trying to achieve? More information would help us to address the problem precisely..
 

bobbybeers

Registered User.
Local time
Today, 03:02
Joined
Mar 14, 2013
Messages
17
well i've built the query and saved it as a query (with an existing table). Now, I want to copy and paste that sql language as part of a button on a form, except, I will take and replace the table name in the SQL with a value from a combobox on my form.....I just don't know how to write the language to do that. When I push the button, I want the button to run the SQL statement with the combobox value plugged in.....does that make sense??
 

Users who are viewing this thread

Top Bottom