Link to home
Start Free TrialLog in
Avatar of Sacha Walter
Sacha WalterFlag for Canada

asked on

Modify 'You must enter a value in the 'XXX' field (Access 2010)

Hi Experts,

I'm having difficulty finding a resource for error handling that I actually understand.  If I wanted to modify the message 'You must enter a value in the 'XXX' field, how would I go about it?

I would just like to change the text message that displays and have an OK button while eliminating the  'Help' button that shows.

Thanks!
Avatar of Barry Cunney
Barry Cunney
Flag of Ireland image

For general error handling you would do something like the below

Sub FormSave

On Error GoTo errHandler

...

  Exit Sub
errHandler:
  MsgBox "Error " & Err.Number & ": " & Err.Description & " in " & _
   VBE.ActiveCodePane.CodeModule, vbOKOnly, "Error"
End Sub


For validating input on a form and giving a very customized message you may have to write some customized code behind a save button that validates user imput
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial