Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF Question

Status
Not open for further replies.

Sadukar

Technical User
Feb 19, 2003
159
IE
Hi All,
Cant figure this out!

If a verification box is checked then I want to ask if "you want to Print again"
I want a yes or no, yes being print again and no being end. (Ie yes goes to Else)
I need the print code after ELSE so I can print report as normal if they are not checked off as printed.

If Me.Verificationbox.Value = "-1" Then
MsgBox "Already printed! Do you want to print again?" (What do I do here?)
Else
DoCmd.OpenReport ReportName, acPreview

How do I do this?

I would appreciate any suggestions.

Thanks
S.
 
Try

If Me.Verificationbox.Value = -1 Then

If MsgBox("Already printed!" & chr(10) & "Do you want to print again?")=vbYes then
DoCmd.OpenReport ReportName, acViewNormal
End If

Else
DoCmd.OpenReport ReportName, acPreview
End If
 
Thanks DJS2
Exactly what I wanted.
Except:
You forgot , vbYesNo at the end.
EG: If MsgBox("Already printed!" & chr(10) & "Do you want to print again?", vbYesNo)=vbYes then

Not trying to be critical just adding it in case anyone else is going to look up post in future.

thanks for help
S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top