no options for acHidden

tanzania

Registered User.
Local time
Today, 10:45
Joined
Oct 20, 2006
Messages
91
Hi, i need to hide a report when it is opened in another function with

DoCmd.OpenReport rptName, acViewDesign,,acHidden

but it does not allow me the full set of arguments! why!?

cheers

Tania
 
Two comments

1 - the windowmode arguement for reports became available starting with the 2002 (xp) version - is that what you're working with?
2 - the windowmode arguement is the fifth arguement (should it be available in the version you're working wiht, see #1), you've put it as the fourth

Does any of this answer your question?

If you're working with a previous version, you might perhaps try something along the following lines

dim r as report
DoCmd.OpenReport rptName, acViewDesign
set r = reports(rptName)
r.visible = false
 
hi, sorry incorrect written line-i did have correct number of arguments in code-however i am using access 2000-thats my problem!i didnt realise this as openform allows this argument.

I tried your suggestion and it does not work for what I am trying to do.I am cycling through all reports to define page settings-in order to do this i need to open all the reports then close them.however this creates flashes of windows when i run the code on a forms load event which i am trying to avoid.any more suggestions would be appreciated!
 
Try to enclose the routine in

application.echo false
' useful code
application.echo true

then, no need for toggling the visible property of the report - you might remember that when you close and save the last report prior to using this, that you ensure any of those design time thingies are closed, too (property sheet, field list, sorting grouping dialog...), as I'm not sure whether this echo thingie (I just love that term) affects them.

NOTE - ensure that the exit point of the routine sets echo = true, else you'll be having !fun ;)
 

Users who are viewing this thread

Back
Top Bottom