Solved

How to open a Report on top of the switchboard as referring form closes

Posted on 2014-03-11
2
483 Views
Last Modified: 2014-03-11
A simple form with a combo box allows the user to select a service manager in order to open a report to list this person's action items.  This same method is used for two different reports.   One report opens in front of the Switchboard for immediate use.   I need the other to do the same, but it opens behind the Switchboard.  I don't know that anything is different between the forms/reports/code.  

How can I ensure a Report is opened in front of the Switchboard as the selecting Form is closed?

Listed below is the procedure that works, followed by the one that doesn't:

Private Sub cboNBitemSelect_AfterUpdate()
Dim SelectedCSM As String
SelectedCSM = Me!cboNBitemSelect.Column(0)
DoCmd.Close acForm, "fm_CSMSelectForNBReport"
If SelectedCSM = "All CSMs" Then
    DoCmd.OpenReport "rpNewBusinessStatus", acViewReport
Else
    DoCmd.OpenReport "rpNewBusinessStatus", acViewReport, , "NBCSM = '" & SelectedCSM & "'"
End If
End Sub

Private Sub cboCSitemSelect_AfterUpdate()
Dim SelectedCSM As String
SelectedCSM = Me!cboCSitemSelect.Column(0)
DoCmd.Close acForm, "fm_CSMSelectForCSReport"
If SelectedCSM = "All CSMs" Then
    DoCmd.OpenReport "rpClientServiceStatus", acViewReport
Else
    DoCmd.OpenReport "rpClientServiceStatus", acViewReport, , "CS_CSM = '" & SelectedCSM & "'"
End If
End Sub
0
Comment
Question by:David_W_R
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 39920587
try adding the option to open the report in dialog(modal) mode

DoCmd.OpenReport "rpNewBusinessStatus", acViewReport, windowmode:=acDialog
0
 

Author Closing Comment

by:David_W_R
ID: 39920642
Mighty fine!   Many thanks!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now