Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / December 2005

Tip: Looking for answers? Try searching our database.

How do I find out in Report_Open if the Report is opend with a fil

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tobias Olbort - 21 Dec 2005 10:07 GMT
Hello,

in an ADP I want to discover in the Report_Open-event, if a filter or
where-condition is set by DoCmd.OpenReport. If not, I want to ask the user
for a parameter.

Thanks.

Tobias
Duane Hookom - 21 Dec 2005 12:30 GMT
I haven't tested this in an ADP, however in an MDB your code might be
something like:

If Len(Me.Filter & "") = 0 Then
    Me.Filter = InputBox([Enter a proper filter string])
    Me.FilterOn = True
End If

Signature

Duane Hookom
MS Access MVP

> Hello,
>
[quoted text clipped - 5 lines]
>
> Tobias
Tobias Olbort - 21 Dec 2005 13:13 GMT
> I haven't tested this in an ADP, however in an MDB your code might be
> something like:
[quoted text clipped - 13 lines]
> >
> > Tobias
Tobias Olbort - 21 Dec 2005 14:10 GMT
Hello Duane,

sorry, but I did'nt mention, that Filter and ServerFilter stay empty when
Report is opened via DoCmd.OpenReport with a WHERE-clause.

Tobias

> I haven't tested this in an ADP, however in an MDB your code might be
> something like:
[quoted text clipped - 13 lines]
> >
> > Tobias
Duane Hookom - 21 Dec 2005 14:39 GMT
My testing suggests the Where clause is in the ServerFilter property. I
added a text box to the report header with a control source of:
 =[ServerFilter]
and it accurately displayed the Where clause from the DoCmd.OpenReport.

Signature

Duane Hookom
MS Access MVP
--

> Hello Duane,
>
[quoted text clipped - 21 lines]
>> >
>> > Tobias
Tobias Olbort - 21 Dec 2005 14:50 GMT
Hello Duane,

you are right, the same works in my report. But in Report_Open the
ServerFilter has no value!

Tobias

> My testing suggests the Where clause is in the ServerFilter property. I
> added a text box to the report header with a control source of:
[quoted text clipped - 26 lines]
> >> >
> >> > Tobias
Duane Hookom - 21 Dec 2005 16:10 GMT
If you wrote the code to open the report, you should be able to determine
this before the report is ever opened.

Signature

Duane Hookom
MS Access MVP
--

> Hello Duane,
>
[quoted text clipped - 36 lines]
>> >> >
>> >> > Tobias
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.