A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Requery in a report



 
 
Thread Tools Display Modes
  #1  
Old November 18th, 2005, 04:20 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Requery in a report

One of my reports needs to set a filter and
"Requery" the RecordSource accordingly.
The filter expression is obtained via a public
variable, an O2K necessity with reports, but
when I code Me.Requery after having set
the filter the Me.Requery raises an error.

I tried passing the filter expression via the
DoCmd.OpenReport Where clause, but
that doesn't seem to work, or I don't have
the syntax correct?
E.g., "FamilyDuplex = " & GrpExp

Apparently the Requery method is not
valid in reports. How do I accomplish this
task?

Thanks,
Bill


  #2  
Old November 18th, 2005, 04:45 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Requery in a report

Using the Where clause in the DoCmd.OpenReport is the method I tend to use.
If FamilyDuplex is a text field, you need to use something like:
DoCmd.OpenReport "rptYourRpt", acPreview, _
, "FamilyDuplex = """ & GrpExp & """"


--
Duane Hookom
MS Access MVP
--

"Bill" wrote in message
ink.net...
One of my reports needs to set a filter and
"Requery" the RecordSource accordingly.
The filter expression is obtained via a public
variable, an O2K necessity with reports, but
when I code Me.Requery after having set
the filter the Me.Requery raises an error.

I tried passing the filter expression via the
DoCmd.OpenReport Where clause, but
that doesn't seem to work, or I don't have
the syntax correct?
E.g., "FamilyDuplex = " & GrpExp

Apparently the Requery method is not
valid in reports. How do I accomplish this
task?

Thanks,
Bill



  #3  
Old November 18th, 2005, 04:57 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Requery in a report

Thanks, I was suspicious that I didn't have the syntax
correct on the "Where" parameter to OpenReport.
I'll try that now.
Thanks again,
Bill



"Duane Hookom" wrote in message
...
Using the Where clause in the DoCmd.OpenReport is the method I tend to
use. If FamilyDuplex is a text field, you need to use something like:
DoCmd.OpenReport "rptYourRpt", acPreview, _
, "FamilyDuplex = """ & GrpExp & """"


--
Duane Hookom
MS Access MVP
--

"Bill" wrote in message
ink.net...
One of my reports needs to set a filter and
"Requery" the RecordSource accordingly.
The filter expression is obtained via a public
variable, an O2K necessity with reports, but
when I code Me.Requery after having set
the filter the Me.Requery raises an error.

I tried passing the filter expression via the
DoCmd.OpenReport Where clause, but
that doesn't seem to work, or I don't have
the syntax correct?
E.g., "FamilyDuplex = " & GrpExp

Apparently the Requery method is not
valid in reports. How do I accomplish this
task?

Thanks,
Bill





  #4  
Old November 18th, 2005, 06:47 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Requery in a report

Duane,
I observe Me.Filter to be the expression that was passed
as the "Where" clause to the OpenReport. However, it's
not at all clear at what stage of processing in the report
that the value of Me.Filter is available for inspection from
code. I.e., in the OnOpen code sometimes Me.Filter is
set per the "Where" and other times it's empty.

Is there some sort of inherent delay or something like that?

Thanks,
Bill



"Duane Hookom" wrote in message
...
Using the Where clause in the DoCmd.OpenReport is the method I tend to
use. If FamilyDuplex is a text field, you need to use something like:
DoCmd.OpenReport "rptYourRpt", acPreview, _
, "FamilyDuplex = """ & GrpExp & """"


--
Duane Hookom
MS Access MVP
--

"Bill" wrote in message
ink.net...
One of my reports needs to set a filter and
"Requery" the RecordSource accordingly.
The filter expression is obtained via a public
variable, an O2K necessity with reports, but
when I code Me.Requery after having set
the filter the Me.Requery raises an error.

I tried passing the filter expression via the
DoCmd.OpenReport Where clause, but
that doesn't seem to work, or I don't have
the syntax correct?
E.g., "FamilyDuplex = " & GrpExp

Apparently the Requery method is not
valid in reports. How do I accomplish this
task?

Thanks,
Bill





  #5  
Old November 18th, 2005, 06:53 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Requery in a report

I moved my "inspection" code to the OnFormat of the
ReportHeader section and consistently find the expression
that was passed as the "Where" clause.

That will solve my needs, but I still don't understand the
opening sequence and exactly at what point Me.Filter
is available to code?

Thanks,
Bill


"Bill" wrote in message
ink.net...
Duane,
I observe Me.Filter to be the expression that was passed
as the "Where" clause to the OpenReport. However, it's
not at all clear at what stage of processing in the report
that the value of Me.Filter is available for inspection from
code. I.e., in the OnOpen code sometimes Me.Filter is
set per the "Where" and other times it's empty.

Is there some sort of inherent delay or something like that?

Thanks,
Bill



"Duane Hookom" wrote in message
...
Using the Where clause in the DoCmd.OpenReport is the method I tend to
use. If FamilyDuplex is a text field, you need to use something like:
DoCmd.OpenReport "rptYourRpt", acPreview, _
, "FamilyDuplex = """ & GrpExp & """"


--
Duane Hookom
MS Access MVP
--

"Bill" wrote in message
ink.net...
One of my reports needs to set a filter and
"Requery" the RecordSource accordingly.
The filter expression is obtained via a public
variable, an O2K necessity with reports, but
when I code Me.Requery after having set
the filter the Me.Requery raises an error.

I tried passing the filter expression via the
DoCmd.OpenReport Where clause, but
that doesn't seem to work, or I don't have
the syntax correct?
E.g., "FamilyDuplex = " & GrpExp

Apparently the Requery method is not
valid in reports. How do I accomplish this
task?

Thanks,
Bill







  #6  
Old November 18th, 2005, 02:19 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Requery in a report

The filter property will be available in any On Format or On Print event.
You can also bind the filter property to a text box like:
="Current Report Filter: " & [Filter]

--
Duane Hookom
MS Access MVP
--

"Bill" wrote in message
ink.net...
I moved my "inspection" code to the OnFormat of the
ReportHeader section and consistently find the expression
that was passed as the "Where" clause.

That will solve my needs, but I still don't understand the
opening sequence and exactly at what point Me.Filter
is available to code?

Thanks,
Bill


"Bill" wrote in message
ink.net...
Duane,
I observe Me.Filter to be the expression that was passed
as the "Where" clause to the OpenReport. However, it's
not at all clear at what stage of processing in the report
that the value of Me.Filter is available for inspection from
code. I.e., in the OnOpen code sometimes Me.Filter is
set per the "Where" and other times it's empty.

Is there some sort of inherent delay or something like that?

Thanks,
Bill



"Duane Hookom" wrote in message
...
Using the Where clause in the DoCmd.OpenReport is the method I tend to
use. If FamilyDuplex is a text field, you need to use something like:
DoCmd.OpenReport "rptYourRpt", acPreview, _
, "FamilyDuplex = """ & GrpExp & """"


--
Duane Hookom
MS Access MVP
--

"Bill" wrote in message
ink.net...
One of my reports needs to set a filter and
"Requery" the RecordSource accordingly.
The filter expression is obtained via a public
variable, an O2K necessity with reports, but
when I code Me.Requery after having set
the filter the Me.Requery raises an error.

I tried passing the filter expression via the
DoCmd.OpenReport Where clause, but
that doesn't seem to work, or I don't have
the syntax correct?
E.g., "FamilyDuplex = " & GrpExp

Apparently the Requery method is not
valid in reports. How do I accomplish this
task?

Thanks,
Bill









 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reporting subreport total on main report BobV Setting Up & Running Reports 22 November 1st, 2005 03:19 AM
To Sharkbyte and all: Calculate a total values in group level Ally General Discussion 6 June 13th, 2005 08:16 PM
Set up a report using more than one query jbeck2010 Database Design 6 February 12th, 2005 06:59 AM
Help!! I'm running around in circles! CathyA New Users 19 December 12th, 2004 07:50 PM
Save Report With CreateReport Coding Issue Jeff Conrad Setting Up & Running Reports 8 July 12th, 2004 08:39 AM


All times are GMT +1. The time now is 10:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.