I have a combo box I am using for a criteria for a recordset filter in VBA modual and I want it to work if the box is NULL or is populated
I am trying to take this from a query which works fine if the Combo box is null or is populated
I have this which works so far in my code. I am using the variable "DirectorID" as a filter on the recordset. I have to use the filter as the recordset is created from a union query of 22 queries.
This also works IF the combo box is not null
But when I attempt to make them work together I get "Mismatch" error.
I have been working with this bit of code
What does it take to add the Like "*" to my assignment statement to DirectorID?
Can someone please embarass me with something simple that I stupidly overlooked?
Thanks
I am trying to take this from a query which works fine if the Combo box is null or is populated
Code:
Like "*" & [Forms]![frmDirectorsTotals]![cboDirector]
I have this which works so far in my code. I am using the variable "DirectorID" as a filter on the recordset. I have to use the filter as the recordset is created from a union query of 22 queries.
This also works IF the combo box is not null
Code:
DirectorID = Eval("Forms![frmDirectorsTotals]!cboxDirector.column(0)")
But when I attempt to make them work together I get "Mismatch" error.
I have been working with this bit of code
Code:
DirectorID = "Like """ * """ & " & Eval("[Forms]![frmDirectorsTotals]![cboxdirector].column(0)")
What does it take to add the Like "*" to my assignment statement to DirectorID?
Can someone please embarass me with something simple that I stupidly overlooked?
Thanks