Conditions and Comparison Operators

LadyDi

Registered User.
Local time
Today, 08:47
Joined
Mar 29, 2007
Messages
894
I have a form where changes to orders are recorded. If a change is marked (a checkbox) as Delete Only, I want another field to force the person entering it to enter a negative dollar amount, and vice versa (if the change is not Delete Only, I want the field to force the person to enter a positive amount). I can't seem to get this to work. I tried using a comparison operator on the amount field, but I keep getting error messages. I tried looking up the comparison operators in the Help menu, but that only confused me more. What do I need to do?
 
Don't rely on the user, programmatically do it. The amount and the checkbox is available on the form.

Why is the user specifying the dollar amount? A user will almost always get it wrong.
 
The only way to get an exact dollar amount for these changes is to have the user enter the information, because the dollar amount can vary widely. I am trying to make the form as "error proof" as possible. This is why I would like to put the aforementioned restriction on the amount field.
 
You're probably not referencing your form controls properly. Access is unforgiving in that respect.

Without more specific info, it's hard to suggest an answer.

"Error proof" isn't the proper term. Think "idiot proof."

Have the checkbox determine the sign of the amount; that elimi9nate one error.

Use a button to indicate make a textbox for the value become visible. The on the textbox AfterUpdate event do the validation on the value, sign change, and store.
 
Simple Software Solutions

Hi

Here's a little trick

To turn a positive number into a negative number then multiply the value by -1

therefore -330 becomes 300 and 300 becomes -300.

Simply take the value from the form or the user and perform the calculation.

Code Master:cool:
 

Users who are viewing this thread

Back
Top Bottom