lazaridisaris
Programmer
Hi all,
I have a combo box that has as recordsource
"SELECT End_pro.[a-a_End_pro], [End_APO_name] & "-" & [End_STO_Pro_name] AS [Apo pros], End_pro.End_STO_Pro_name FROM End_pro;"
in VBA code I search for a specific string which I pass to a variable named TmpVar.
and then I
MyCMB.rowsource = "SELECT End_pro.[a-a_End_pro], [End_APO_name] & "-" & [End_STO_Pro_name] AS [Apo pros], End_pro.End_STO_Pro_name FROM End_pro WHERE End_pro.End_STO_Pro_name = " & TmpVar & ";"
And I get Run-Time error '13' Type Mismatch
What I want to acomplish is to filter the results of the combo box so the users dont by mistake select some thing that is not correct.
If there is a different way to do that it would be very appriciated.
ps
My Combo box has as control source a field
Thanks in advance
Aris
I have a combo box that has as recordsource
"SELECT End_pro.[a-a_End_pro], [End_APO_name] & "-" & [End_STO_Pro_name] AS [Apo pros], End_pro.End_STO_Pro_name FROM End_pro;"
in VBA code I search for a specific string which I pass to a variable named TmpVar.
and then I
MyCMB.rowsource = "SELECT End_pro.[a-a_End_pro], [End_APO_name] & "-" & [End_STO_Pro_name] AS [Apo pros], End_pro.End_STO_Pro_name FROM End_pro WHERE End_pro.End_STO_Pro_name = " & TmpVar & ";"
And I get Run-Time error '13' Type Mismatch
What I want to acomplish is to filter the results of the combo box so the users dont by mistake select some thing that is not correct.
If there is a different way to do that it would be very appriciated.
ps
My Combo box has as control source a field
Thanks in advance
Aris