Calling Filtered report from cmdbutton on form

D

Dale C Gray

I've tried every syntax known to man? I can't get this report to filter,
the workaround has been to have the report bound to a query that has the
label criteria set to true. What syntax have I not used! Thanks all!

Case 3
strDocName = "Labels Zebra000"
strWhere = "[Label] = -1"
DoCmd.OpenReport strDocName, acPreview
End Select

Also tried:
"[Label]=True"
"[Label]=" & True
"[Label]=" & -1

Acccckkkk!
 
D

Duane Hookom

You need to add the strWhere as the where clause:

Case 3
strDocName = "Labels Zebra000"
strWhere = "[Label] = -1"
DoCmd.OpenReport strDocName, acPreview, , strWhere
End Select
 
D

Dale C Gray

Oh for heavens sake....Thanks Duane...guess one shouldn't be working on this
stuff when tired!!
Duhhhh!

Duane Hookom said:
You need to add the strWhere as the where clause:

Case 3
strDocName = "Labels Zebra000"
strWhere = "[Label] = -1"
DoCmd.OpenReport strDocName, acPreview, , strWhere
End Select


--
Duane Hookom
MS Access MVP


Dale C Gray said:
I've tried every syntax known to man? I can't get this report to filter,
the workaround has been to have the report bound to a query that has the
label criteria set to true. What syntax have I not used! Thanks all!

Case 3
strDocName = "Labels Zebra000"
strWhere = "[Label] = -1"
DoCmd.OpenReport strDocName, acPreview
End Select

Also tried:
"[Label]=True"
"[Label]=" & True
"[Label]=" & -1

Acccckkkk!
 

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