Solved

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

Posted on 2006-07-21
3
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

739 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