troubleshooting Question

Trying to change the default message

Avatar of dirtycarpet
dirtycarpetFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft AccessEmail Clients
27 Comments1 Solution388 ViewsLast Modified:
hi all
when a user of my database tries to add a film that is over 250mins, the user is alerted by a msgbox (this is what i want to happen) it asks them if this is correct. however if they press cancel on the msgbox i get the unfriendly access message (an error has been encountered etc etc) how can i change this to something more user friendly?
code for this cmd button is attached
tia
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim mbxResult As VbMsgBoxResult

If Me.txtFilmLengthMinutes.Value > 250 Then
mbxResult = MsgBox("Film Length is over " & "250 minutes. Is this correct?", _
vbQuestion + vbOKCancel)
End If

If mbxResult = vbCancel Then
Cancel = True

Me.txtFilmLengthMinutes.SetFocus
End If
End Sub
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 27 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 27 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros