Hello everyone. I have a Microsoft Access form that is behaving in the strangest manner. I set up a macro as the Before_Update event of an unbound control so as to validate the quantity (of an item) being sold. One part of the validation is to ensure that the quantity being sold is not greater than the available quantity of the item. However I notice the strangest thing:
If the AvailableQty is say: 45 , I cannot enter '5' as the quantity sold. For some reason Access is evaluating only the first digit of the AvailableQty. So as 5 is greater than 4, I get a false negative error stating that the Qty Sold cannot be higher then the AvailableQty. However, if I enter any number of which its first digit is lower than 4, it accepts the number. In this light, it will accept the following numbers: 1 to 4, 10 to 45.
In other words, if the Available Qty is 500, it won't accept the numbers 60 to 99 because their first digit is greater than the 5 in 500.
I am running Office Professional Plus 2010 (Service Pack 2). What is causing this? I have attached screenshots of both the form (and the error message) as well as a screenshot of the macro. Pls help. Thanks. Qty-Problem.JPG Qty-Problem---Macro---2.JPG
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
-Mike Kapnisakis, Warner Bros
With your subscription - you'll gain access to our exclusive IT community of thousands of IT pros. You'll also be able to connect with highly specified Experts to get personalized solutions to your troubleshooting & research questions. It’s like crowd-sourced consulting.
We can't always guarantee that the perfect solution to your specific problem will be waiting for you. If you ask your own question - our Certified Experts will team up with you to help you get the answers you need.
Our certified Experts are CTOs, CISOs, and Technical Architects who answer questions, write articles, and produce videos on Experts Exchange. 99% of them have full time tech jobs - they volunteer their time to help other people in the technology industry learn and succeed.
We can't guarantee quick solutions - Experts Exchange isn't a help desk. We're a community of IT professionals committed to sharing knowledge. Our experts volunteer their time to help other people in the technology industry learn and succeed.