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


.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Dsum() works sometimes 2
Before update event 2
Too Many arguments 2
Question on frames and msgbox 4
Help - Loop within a loop code 3
Help with code "Type Mismatch" 6
Outlook and Form Issue 3
Help with code 3

Back
Top