Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-07-21
3
Medium Priority
?
249 Views
Last Modified: 2008-03-06
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)?
0
Comment
Question by:sprosser
  • 2
3 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 17158633
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
 

Author Comment

by:sprosser
ID: 17158806
Thank you for your quick response.  This worked perfectly.
0
 
LVL 61

Expert Comment

by:mbizup
ID: 17159717
Glad I could help out  :-)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question