title: DoCmd.OpenReport Frm, acViewNormal not working after vbYes Then.. why?
body: <p>i would like to have two msg boxes yes/no. The first one for saving the form and the second one for printing. Although the following code is working:</p>
  
  <pre><code>Private Sub CmdPrint_Click()
    DoCmd.OpenReport Frm, acViewNormal
  End Sub
  </code></pre>
  
  <p>It's not working within a yes/no MsgBox, it seems that the information is not parsed.</p>
  
  <p>I'm not a programmer, but I like to learn it, probally it's bad on all sides :D</p>
  
  <pre><code>Private Sub Form_BeforeUpdate(Cancel As Integer)
  
    If MsgBox("Je staat op het punt de ingevoerde gegevens op te slaan." &amp; vbCrLf &amp; vbCrLf &amp; "Weet je zeker dat je dit formulier wilt opslaan?", vbYesNo, "Gegevens opslaan") = vbYes Then
      DoCmd.Save
    Else
      DoCmd.RunCommand acCmdUndo
    End If
  
    If IsNull(Me.WrkOrdr) = True Then
      Me.WrkOrdr = Val(Nz(DMax("[WrkOrdrNr]", "WrkPlts"), "0")) + 1
      ''# or   Me.txt2BookNumber = CLng(Nz(DMax("[BookNumber]", "Participant"), "0")) + 1
    End If
  
    If MsgBox("Je staat op het punt dit formulier uit te printen." &amp; vbCrLf &amp; vbCrLf &amp; "Weet je zeker dat je dit formulier wilt uitprinten?", vbYesNo, "Formulier printen") = vbYes Then
      DoCmd.OpenReport Frm, acViewNormal
    Else
      Exit Sub
    End If
  End Sub
  </code></pre>