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