Solved

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

Posted on 2014-03-11
2
487 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access 2016 - query 23 59
Dynamically Reorder List Box 4 37
Delete Records on a Form in Microsoft Access 5 39
FrontEnd tools to create web database application 7 56
This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

776 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