Forms interaction

  • Thread starter Thread starter Junior
  • Start date Start date
J

Junior

In the Form Load event i've placed the code below
The problem if answer is yes - the report opens in preview but the Form
opens over the report
how can i stop the form from displaying until the report is printed or
closed.

strCert = Nz(DMax("[CertNo]", "[QCertTrack]"), "99")
If strCert <> "99" Then
intAns = MsgBox("There are Certificates that have not" _
& vbCrLf & "been timely returned. Want to Print a list now?" _
, vbYesNo + vbQuestion + vbDefaultButton2, "Outstanding
Certificates")
If intAns = vbYes Then
DoCmd.OpenReport "rptCertTrack", acPreview, "", ""
End If
End If
 
Try
DoCmd.OpenReport "rptCertTrack", acPreview, "", "", acDialog

Hope This Helps
Gerald Stanley MCSD
 
Gerald - this produces an error - wrong number of arguments or invalid
property assignment??

Gerald Stanley said:
Try
DoCmd.OpenReport "rptCertTrack", acPreview, "", "", acDialog

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
In the Form Load event i've placed the code below
The problem if answer is yes - the report opens in preview but the Form
opens over the report
how can i stop the form from displaying until the report is printed or
closed.

strCert = Nz(DMax("[CertNo]", "[QCertTrack]"), "99")
If strCert <> "99" Then
intAns = MsgBox("There are Certificates that have not" _
& vbCrLf & "been timely returned. Want to Print a list now?" _
, vbYesNo + vbQuestion + vbDefaultButton2, "Outstanding
Certificates")
If intAns = vbYes Then
DoCmd.OpenReport "rptCertTrack", acPreview, "", ""
End If
End If


.
 
It may be the "" in the 3rd and 4th parameters. Try

DoCmd.OpenReport "rptCertTrack", acPreview, , , acDialog

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Gerald - this produces an error - wrong number of arguments or invalid
property assignment??

Try
DoCmd.OpenReport "rptCertTrack", acPreview, "", "", acDialog

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
In the Form Load event i've placed the code below
The problem if answer is yes - the report opens in preview but the Form
opens over the report
how can i stop the form from displaying until the report is printed or
closed.

strCert = Nz(DMax("[CertNo]", "[QCertTrack]"), "99")
If strCert <> "99" Then
intAns = MsgBox("There are Certificates that have not" _
& vbCrLf & "been timely returned. Want to Print a list now?" _
, vbYesNo + vbQuestion + vbDefaultButton2, "Outstanding
Certificates")
If intAns = vbYes Then
DoCmd.OpenReport "rptCertTrack", acPreview, "", ""
End If
End If


.


.
 
Back
Top