PC Review


Reply
Thread Tools Rate Thread

Access 2010 Visible Property having no effect

 
 
Jim Franklin
Guest
Posts: n/a
 
      5th Aug 2011
Hi,

I have an Acc2010 app where I open a report in Preview mode from a modal,
popup form. I don't want the form to be closed, but want it hidden while the
report is open.

At the moment I set the form Visible property to False in the command button
code which opens the report. This works fine. But when I set the
form.Visible property back to true in the report Close event, nothing
happens. No error, but the form doesn't reappear either.

Code is as follows. This works fine in Acc2003, so anyone know what I am
doing wrong?

Many thanks, as always,
Jim

Private Sub cmdTurnover_Click()
On Error GoTo Err_cmdTurnover_Click

Me.Visible = False
DoCmd.OpenReport "rpt_Turnover", acViewPreview
DoCmd.Maximize

Exit_cmdTurnover_Click:
Exit Sub

Err_cmdTurnover_Click:
MsgBox Err.Description
Resume Exit_cmdTurnover_Click

End Sub

Private Sub Report_Close()
On Error GoTo MyErr

Forms!frm_Menu_Reports.Visible = True

MyExit:
Exit Sub

MyErr:
MsgBox Err.Description
Resume MyExit

End Sub


 
Reply With Quote
 
 
 
 
David-W-Fenton
Guest
Posts: n/a
 
      5th Aug 2011
"Jim Franklin" <(E-Mail Removed)> wrote in
newsxX_p.97942$(E-Mail Removed)2:

> At the moment I set the form Visible property to False in the
> command button code which opens the report. This works fine. But
> when I set the form.Visible property back to true in the report
> Close event, nothing happens. No error, but the form doesn't
> reappear either.
>
> Code is as follows. This works fine in Acc2003, so anyone know
> what I am doing wrong?


I do that frequently, and it works fine. What's the code in your
OnClose event in the report?

Does A2010 allow you to open a report modally, i.e., with the
acDialog switch? If so, you could move the line setting the form
visible out of the report, but I don't have A2010 installed on this
machine to check if it supports acDialog in reports...

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/
 
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
Access 2007 Property for visible tables in navigation pane? Balbina Microsoft Access 2 22nd Mar 2010 07:26 PM
Visible Property with Vista and Access 2007 apc_pmark Microsoft Access Reports 1 7th Aug 2008 07:01 PM
Unable to access visible property of Pivot Items class =?Utf-8?B?R2VvZmY=?= Microsoft Excel Programming 2 21st May 2007 03:00 AM
Unable to access visible property of Pivot Items class =?Utf-8?B?R2VvZmY=?= Microsoft Excel Programming 0 20th May 2007 10:20 PM
property with defalut value will not be called in auto-generated code, and how to make a property only visible at design time? Ryan Liu Microsoft C# .NET 2 27th Aug 2006 03:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:01 PM.