goatsaregreat
Programmer
I am doing a query of a fairly large DB. Each record in the DB has a unique "job #". Every year has its own prefix. what I am trying to do is to query out all the records for one year. I am picking the year with a combo box. Here is the query I am using. I cannot get the "Like" keyword to concatenate the "DB"(prefix) and the combobox which is the year. TIA for your help, and if it is not possible, please tell me, and I'll do it another way. Thanx.
db.Execute "select * into " & Combo1.Text & " " & _
"from maindata " & _
"where [Job #] like 'DB' & Combo1.Text & " " & _
"order by [Job #]"
db.Execute "select * into " & Combo1.Text & " " & _
"from maindata " & _
"where [Job #] like 'DB' & Combo1.Text & " " & _
"order by [Job #]"