JeffBarker
Registered User.
- Local time
- Today, 12:30
- Joined
- Dec 7, 2010
- Messages
- 130
I'm trying to open a report from a Button on a form, but when the report opens it hides behind the other forms on-screen, meaning you have to go to Window and then select it to bring it forward.
Here's the code I'm using in the on-click event of the first form:
Any help would be appreciated, cheers.
Here's the code I'm using in the on-click event of the first form:
Code:
Private Sub btnPrint_Click()
On Error GoTo Err_btnPrint_Click
Dim stDocName As String, vResult As Integer
Dim vOption As Integer, vNow As String
vOption = opt1
If opt1 = 1 Then stLinkCriteria = "" Else stLinkCriteria = "[ReBadge]= TRUE"
If cmbBadgeType = "Delegate" Then
DoCmd.OpenReport "rptBadgesDelegates", acViewPreview, , stLinkCriteria
Else
DoCmd.OpenReport "rptBadgesAll", acViewPreview, , stLinkCriteria
End If
DoCmd.Close acForm, Me.Name
Any help would be appreciated, cheers.