Need help with this. Getting errors every time I run it.
I am selecting a text "1" or "2" or "3" or All from a combo box. I started out coding this directly in the query but ran into problems because I have five combo boxes on this form and found it easier to do VBA (I think) for combox that need the "All" criteria.
My code looks like this and is not working:
Me.[Marketing subform].Form.Filter = "[T_YPEINSTI] = Chr$ (34) 1 Chr$ (34)"
I would expect the SQL translation of that would be Field = "1" and it would select all of the "1"'s. What am I doing wrong.
Also, while you are helping me what would the syntax be for the 'All' which is "1" Or "2" Or "3". Having trouble getting that one to work. I tried Not IsNull and it didn't like it. Tried other ideas to and did not like any of them.
Thanks for your help!
jketcher
I am selecting a text "1" or "2" or "3" or All from a combo box. I started out coding this directly in the query but ran into problems because I have five combo boxes on this form and found it easier to do VBA (I think) for combox that need the "All" criteria.
My code looks like this and is not working:
Me.[Marketing subform].Form.Filter = "[T_YPEINSTI] = Chr$ (34) 1 Chr$ (34)"
I would expect the SQL translation of that would be Field = "1" and it would select all of the "1"'s. What am I doing wrong.
Also, while you are helping me what would the syntax be for the 'All' which is "1" Or "2" Or "3". Having trouble getting that one to work. I tried Not IsNull and it didn't like it. Tried other ideas to and did not like any of them.
Thanks for your help!
jketcher