msgbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

i am new to msgbox and i am trying to ask the user a question
msgbox(Do You Want To print report),vbYesNo

which is fine but then i want to action the print if the answer is "yes"
i.e. print a report but i am now stuck on how to do this!

Any help will be appreciated
 
If MsgBox("Do you want to print report?", vbYesNo) = vbYes Then
'print the report
End If
 
Hello

Not still not sinking in! do i have to do a 'if ' YES then print report or
something in the docmd
 
If MsgBox("Do you want to print report?", vbYesNo) = vbYes Then
DoCmd.OpenReport "YourReportNameHere", acViewPreview
End If
 
ka ching

Thanks for that!

Brendan Reynolds said:
If MsgBox("Do you want to print report?", vbYesNo) = vbYes Then
DoCmd.OpenReport "YourReportNameHere", acViewPreview
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

Back
Top