Solved

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

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

810 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