VERY BASIC. How can I create a total cost field?

dnlyng

New member
Local time
Today, 13:36
Joined
Oct 27, 2014
Messages
1
Hello,

Sorry for the basic nature of this post. I am at my wits end. I'm doing a PT computing course, and have zero experience of access, nor have I ever opened it before this course but now have to build a simple database. I havent been taught anything in class, and merely learnt everything from a textbook. (It shows how poorly some people regard education, and teaching nowadays)

Anyway, I have a table called Price list, and in it I have two fields, one called Service and The other called cost. The services are listed and their matching prices are listed beside.

In another table called appointments, when making an appointment, I have linked the information so that I can choose from a dropdown from the price list table, under Service type.

I need to be able to create a receipt for the appointment. How can I do that in a query format?

Any help is greatly appreciate,

Best,

-DY-
 
to get you started, your query will be something like this


Code:
SELECT AppointmentID, Quantity*cost as price 
FROM appointments inner join Pricelist on appointments.service=pricelist.service
WHERE AppointmentID=[Enter AppointmentID]

However you haven't explained whether an appointment can have more than one service, whether you would want to list them in your receipt and also require a total if that is the case. If this is the case, you will need a separate query for the total unless you use a form or report.

In later versions of Access, there is a way of displaying a total in the query window, but this will not generate a receipt
 

Users who are viewing this thread

Back
Top Bottom