Hi everyone,
I looked all over internet to understand how to use combo box parameter as the chosen field in the upcoming query creation.
Sub CreateQuery()
Dim db As DAO.Database
Dim qDef As DAO.QueryDef
Set db = CurrentDb
Set qDef = db.CreateQueryDef("MyQuery")
qDef.SQL = "SELECT * FROM "
qDef.Close
db.Close
Set qDef = Nothing
Set db = Nothing
Application.RefreshDatabaseWindow
End Sub
How can I use a combo box parameter after SELECT or FROM in SQL SYNTAX?