I use the following code underlying a combo box search form for a database:
Private Sub OK_Click()
Dim Where As String
Const ObType = "Form"
Where = Where & MakeSQL(1, "completeddate", 8)
Where = Where & MakeSQL(2, "MDEissue", ?)
Where = Where & MakeSQL(3, "library", 10)
On Error GoTo...