PC Review


Reply
Thread Tools Rate Thread

Calling Filtered report from cmdbutton on form

 
 
Dale C Gray
Guest
Posts: n/a
 
      24th Sep 2003
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!


 
Reply With Quote
 
 
 
 
Duane Hookom
Guest
Posts: n/a
 
      24th Sep 2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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!
>
>



 
Reply With Quote
 
Dale C Gray
Guest
Posts: n/a
 
      24th Sep 2003
Oh for heavens sake....Thanks Duane...guess one shouldn't be working on this
stuff when tired!!
Duhhhh!

"Duane Hookom" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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!
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing a filtered report to a filtered form Sarah Microsoft Access Forms 3 5th Aug 2009 02:30 PM
Re: Report filtered by form Marshall Barton Microsoft Access Reports 0 1st Apr 2009 09:25 PM
Calling SQL stored procedure from form control cmdButton PsyberFox Microsoft Access Form Coding 4 2nd Feb 2009 01:09 PM
Improve my code? CmdBtns calling filtered form. =?Utf-8?B?TWFhcmty?= Microsoft Access Form Coding 4 18th Oct 2007 07:44 PM
How to pass the name of the cmdbutton calling an Excel VBA procedu =?Utf-8?B?TFBT?= Microsoft Excel Programming 2 16th Nov 2006 03:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:16 PM.