Wine Format Query

Wally2k5

New member
Local time
Today, 05:39
Joined
Oct 4, 2005
Messages
9
Hello,

First I apologise if this is in the wrong forum, I couldn't decide and guessed someone may move it if required.

I am currently attempting to create a database for a wine cellar. This requires to be able to count in cases of 12. I want to express the stock as number of cases and number of bottles. For example 38 bottles would be 3 cases and 2 bottles (ie "3-2"). I am not hugely experienced with Access and would appreciate any help.

Many thanks

Wally
 
You would want to store the number of bottles you had as a number of bottles (ie, 38). You could then just take the integer portion of the number of bottles divided by 12 for the number of cases, and you could use the MOD function to get the number of loose bottles. MOD will return the remainder of the division of two numbers (in this case, 38 MOD 12 = 2).
 
Thank you very much for a very helpful reply. Is there anyway in which I can display it all in one box, it must be an input mask of some description.
 
Assuming you have a field in your recordset called quantity, you can set the datasource of a text box to be:

=Int([Quantity]/12) & " - " & [Quantity] Mod 12
 
Is there a way in which I can set an input mask for the [Quantity] field in my tbl.Products? and have the format so it displays in the format A-B
 

Users who are viewing this thread

Back
Top Bottom