Code running report despite default set to not (1 Viewer)

Are these other projects on the same machine?
Yes
You COULD have a situation where an app does something that no other app does.
That's the case with this app. I did the Application.SaveAsText that Tom suggested and did not see any corruption. I also examined that forms code with a hex editor, but that was useless. So instead of beating this dead horse I did not use the vbDefaultButton2 constant, inverted my logic to the default Yes button, "DON'T print customer receipt?", and that works ugh.

Maybe some gremlin changed the vbNo constant to vbYes 👹

Code:
Private Sub cmdPrintReceipt_Click()
Dim response as String
response = MsgBox("DON'T Print Customer Receipt?", vbYesNo)
If response = vbYes Then Exit Sub
DoCmd.OpenReport "rptPrintCustomerReceipt", , , "[ContractNo] = " & Me.ContractNo
End Sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom