Hello, this is my first post. Thanks for reading.
I am trying to open a form on a Click event where the records displayed are what the user has selected on several form combo boxes. Some of the combo boxes contain text and some numbers. I am getting a data mismatch erorr in Ac07 when I try to combine both data types in the same Where condition. Here is my code:
Could it be because I am declaring this as a string? I tried a CInt(ID) but that didn't seem to work, but maybe my syntax was wrong.
Thank you for your help!
I am trying to open a form on a Click event where the records displayed are what the user has selected on several form combo boxes. Some of the combo boxes contain text and some numbers. I am getting a data mismatch erorr in Ac07 when I try to combine both data types in the same Where condition. Here is my code:
Code:
Dim strWhere As String strWhere = "[ID] = " & Me.cboID Or "[Type] = '" & Me.cboType & "'" DoCmd.OpenForm "MyForm", , , strWhere, acFormEdit
Thank you for your help!
Comment