Decimal in a textbox

Garrett!

Registered User.
Local time
Today, 07:29
Joined
May 26, 2015
Messages
27
I feel like this a dumb question, but how do I show a decimal in a text box? Here is what I have. I have a SQL back-end and Access front-end. The user selects an item out of a combo box and then text boxes for Unit of Measure, Cost, and Description are populated. The user then has to enter the Quantity and I have a calculation that multiplies the cost by quantity for Total Cost. This works perfectly for whole numbers. The problem is sometimes my item could be a decimal. If it is a decimal then I get 0 in Total Cost. In my SQL table the Quantity field has a data type of Decimal(18,0). In Access my text box for Quantity has Format of Standard and 2 for Decimal places in the properties. Am I missing something simple to get my equation to work?
 
total cost, if stored, is what data type
 
Total Cost is stored. It has a data type of Currency. Cost is currency as well.
 
Good point. I changed it to Decimal (18,2). It now stores my decimal if the Quantity field. That solved it. Thank you!
 

Users who are viewing this thread

Back
Top Bottom