?
Solved

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

Posted on 2014-03-11
2
Medium Priority
?
496 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 2000 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

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.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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…
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…
Suggested Courses

800 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