Multiplying two fields together.

Bullkank

New member
Local time
Yesterday, 17:38
Joined
Mar 21, 2011
Messages
1
Hey,

So i have these two fields. Ticket Type and Quantity. This is for a database regarding concert ticket sales.

What i need, is for the database to automatically multiply these two fields together, of which the resulting value is to appear in another field, "Ticket Cost".

However, The Ticket Type field quantities vary.

there are 3 tickets, Adult, Child/Concession and Pensioner.

Adult = $25
Child/Concession = $15
Pensioner = $12

ie// Adult ( $25) * Quantity ( 2 ) = Ticket Cost ( $50 )

I'm new-ish to MS Access, so itd be great if you could be me with my troubles =S
 
What I'd do here is have ticket prices in a table, then use a combo box on your form to look up the ticket type, have a text box to enter the quantity then a calculated field to multiply the results together.

Also what I'd do is have the ticket selection controls (combo, text box etc.) in a subform on your main form, in continuous viewl. That way you'd be able to select a variety of tickets for each performance and have it add up the total ticket cost.

I originally thought just store the ticket values in the combo box, but if it's in a table it'd be easier to change.
 
Definitely put your ticket prices in a table. I would put the calculations in a query, not directly on the form. Like a field.... Sales: [TicketCost]*[TicketsOrdered]
This way you don't need calculations on the form or reports.
Also something to think about..... When I am using calculations I always want to consider if the price will change in the future... Will I need to know what the price was today vs 2 years from now... If this is the case then consider also saving the result to a table for historical purposes.
 

Users who are viewing this thread

Back
Top Bottom