I have got a similar problem with commas in combo box my table has a id field that has a category letter and a number
f001
f002
f003
s001
s002
s003
j001
j002
j003
g001
g002
g003....
I have to be able to run a report either all or 1 category. what I am trying to do is change my reports recordsource query on my form I created a combobox
2 column
boundcolumn=1
columnwidth=0";3"
rowsource=valuelist
This is what I tried for the rowsource
;-All-;left(id,1)='f';freshman;left(id,1)='s)';sophomore;left(id,1)='j'; junior ;left(id,1)='g'; senior ;
and the rowsource is translating the commas as field delimitaters
I tried left(id & chr(44)& 1)='f'; freshman that does not work either.
This is the code
dim mydb as database
set mydb=currentdb
mydb.querydefs("queryname".sql="select..." & iif(nz(me!combobox,"">""," where" & mecomboboxname,""& ";"
any help out there
f001
f002
f003
s001
s002
s003
j001
j002
j003
g001
g002
g003....
I have to be able to run a report either all or 1 category. what I am trying to do is change my reports recordsource query on my form I created a combobox
2 column
boundcolumn=1
columnwidth=0";3"
rowsource=valuelist
This is what I tried for the rowsource
;-All-;left(id,1)='f';freshman;left(id,1)='s)';sophomore;left(id,1)='j'; junior ;left(id,1)='g'; senior ;
and the rowsource is translating the commas as field delimitaters
I tried left(id & chr(44)& 1)='f'; freshman that does not work either.
This is the code
dim mydb as database
set mydb=currentdb
mydb.querydefs("queryname".sql="select..." & iif(nz(me!combobox,"">""," where" & mecomboboxname,""& ";"
any help out there