ItsDouglas
Programmer
On the premise there is no dumb question. And I have searched the forums and cannot find exactly what I need to know here.
I have a publically declared variable in a module called 'publicdecs'
Public varResClass As Integer
I populate this variable within a form. Now I need to use this variable's value in a very simple query being used as RowSource of a cmbobox on the form:
cmbobox rowsource: SELECT EntryTypes.txtType, EntryTypes.numResClass FROM EntryTypes WHERE (((EntryTypes.numResClass)='" & varResClass & "'));
When it's run I receive Data Type Missmatch errors. When I change the syntax to:
[Forms]![Main]![varResClass} and DO NOT surround with & or quotes, I do not get any errors but I do not get any data returned either. I realize I could just populate this rowsource from the Form_Load event but I would prefer to make this work. I know it is something VERY simple I am missing here. (I have confirmed that data types are the same)
Thanks
I have a publically declared variable in a module called 'publicdecs'
Public varResClass As Integer
I populate this variable within a form. Now I need to use this variable's value in a very simple query being used as RowSource of a cmbobox on the form:
cmbobox rowsource: SELECT EntryTypes.txtType, EntryTypes.numResClass FROM EntryTypes WHERE (((EntryTypes.numResClass)='" & varResClass & "'));
When it's run I receive Data Type Missmatch errors. When I change the syntax to:
[Forms]![Main]![varResClass} and DO NOT surround with & or quotes, I do not get any errors but I do not get any data returned either. I realize I could just populate this rowsource from the Form_Load event but I would prefer to make this work. I know it is something VERY simple I am missing here. (I have confirmed that data types are the same)
Thanks