Need to use a variable (that takes its value from combo box) in SQL statement in VBA. Not sure how this is done. Neophyte so give me simple step wise instructions without programmer speak. Example is good as long as it is annotated.
SQL looks like this:
propSQL = "SELECT * FROM prices " & "WHERE(((prices.Plant_ID) = 'GA02') AND ......
so instead of the hard-coded string GA02, I want the SQL statement to take a variable whose value is driven from selection in combo box, i.e.
Case 5
locID = "GA02"
Thanks,
jeff
San Diego
SQL looks like this:
propSQL = "SELECT * FROM prices " & "WHERE(((prices.Plant_ID) = 'GA02') AND ......
so instead of the hard-coded string GA02, I want the SQL statement to take a variable whose value is driven from selection in combo box, i.e.
Case 5
locID = "GA02"
Thanks,
jeff
San Diego