Solved

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

Posted on 2006-07-21
3
224 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 500 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now