Calling Filtered report from cmdbutton on form

  • Thread starter Thread starter Dale C Gray
  • Start date Start date
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!
 
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
 
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!
 
Back
Top