Making a field always only accept a positive currency in a text field in an A02 db

Does anyone know of a way to make a text box on a form in an Access 2002 database only accept positive currency values (or maybe always switches it to a positive on exit)?
sprosserAsked:
Who is Participating?
 
mbizupConnect With a Mentor Commented:
Add this code to the after update event of your textbox:

Private Sub txtYourTextbox_AfterUpdate()
    me.txtYourTextbox = abs(me.txtYourTextbox)                     '*** Use the absolute (unsigned) value
end sub
0
 
sprosserAuthor Commented:
Thank you for your quick response.  This worked perfectly.
0
 
mbizupCommented:
Glad I could help out  :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.