Public Function qryParam() As String
If CurrentProject.AllForms("yourFormNameHere").IsLoaded Then
qryParam = Forms!yourFormNameHere!controlName
Else
qryParam = "*"
End If
End Function
SELECT allThatYouWant FROM theTable
WHERE someField LIKE qryParam();
It came up with the following for me Bill..Did you replace frmMyForm and [Forms]![frmMyForm]![MyCtl] with the correct name of your form and control?
Ha ha, I am just so jobless, that I am trying out everything.. So do not beat yourself up.. I have done that several times..Well, that's what I get for not trying it out first.