B
Belinda7237
I havea command button and I have it pull up a report for the existing record
for preview, but it always goes behind the database window so the user wont
be able to see it - how do i get it to preview in front of the database - ie.
it pops up and is visual with the click. Here is the code I have on the
button:
Private Sub Command45_Click()
On Error GoTo ProcError
If Me.Dirty = True Then 'Save the record first
Me.Dirty = False
End If
Debug.Print "[StatsPackageNumber] = " & Me.[STATSpackageNumber]
If Me.NewRecord = True Then
MsgBox "You must enter a new record before attempting to print it.", _
vbInformation, "No Data To Print..."
Else
DoCmd.OpenReport _
ReportName:="LA Individual Package Peer Review Summary", _
View:=acViewPreview, _
WhereCondition:="[StatsPackageNumber] = " _
& Me.[STATSpackageNumber]
End If
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure Command45_Click..."
Resume ExitProc
for preview, but it always goes behind the database window so the user wont
be able to see it - how do i get it to preview in front of the database - ie.
it pops up and is visual with the click. Here is the code I have on the
button:
Private Sub Command45_Click()
On Error GoTo ProcError
If Me.Dirty = True Then 'Save the record first
Me.Dirty = False
End If
Debug.Print "[StatsPackageNumber] = " & Me.[STATSpackageNumber]
If Me.NewRecord = True Then
MsgBox "You must enter a new record before attempting to print it.", _
vbInformation, "No Data To Print..."
Else
DoCmd.OpenReport _
ReportName:="LA Individual Package Peer Review Summary", _
View:=acViewPreview, _
WhereCondition:="[StatsPackageNumber] = " _
& Me.[STATSpackageNumber]
End If
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure Command45_Click..."
Resume ExitProc