I am trying to set criteria of query2 with the value from a combobox. At the moment the code will fill the criteria with the form field location but i need the criteria to show the actual value. so if my combobox shows value 193 and i run the code, it would add 193 to the criteria. can you help?. here is my code
Private Sub Command243_Click()
Dim db As dao.Database
Set db = CurrentDb
Dim qdf As dao.QueryDef
Set qdf = db.QueryDefs("Query2")
qdf.SQL = "Select * From [Query1] WHERE [Job Number] =Forms![Personal_Details_Form]![Job_No_Combo] "
End Sub
Private Sub Command243_Click()
Dim db As dao.Database
Set db = CurrentDb
Dim qdf As dao.QueryDef
Set qdf = db.QueryDefs("Query2")
qdf.SQL = "Select * From [Query1] WHERE [Job Number] =Forms![Personal_Details_Form]![Job_No_Combo] "
End Sub