Solved

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

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

821 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