Passing variable through form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that I want to do a filter on based on what someone selects
on the form. I keep getting errors on this expression in VB and can't figure
out where I've gone wrong (I'm sure it's the quotation marks or something).
Please help:

strDataFilter = "[Period] Between " ' 1' AND " & Combo86.Value & ""

Thanks!
Heather
 
HeatherD25 said:
I have a report that I want to do a filter on based on what someone selects
on the form. I keep getting errors on this expression in VB and can't figure
out where I've gone wrong (I'm sure it's the quotation marks or something).
Please help:

strDataFilter = "[Period] Between " ' 1' AND " & Combo86.Value & ""


If the Period field in its table is a numeric type, then
use:

strDataFilter = "[Period] Between 1 AND " & Combo86

it it's a text field:

strDataFilter = "[Period] Between '1' AND '" & Combo86 & "'"
 
Back
Top