Solved

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

Posted on 2014-03-11
2
492 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

728 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