Passing variable through form

H

HeatherD25

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
 
M

Marshall Barton

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 & "'"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top