I have some simple sql code:
SELECT tblappointment.Appointment_type, tblpatient.Type_of_care, tblappointment.price, [type_of_care] & " " & [appointment_type] AS total, Switch([total]=tblpricing.price) AS Price
FROM tblappointment;
However i think it is all wrong, i want it to take this [type_of_care] & " " & [appointment_type] AS total
from this total i want it to reference with a table called tblpricing to find the correct price for that value. tblpricing is a table that contains two columns, one with the name and the other with the price, i then want to the price to be entered into tblappointment.price column for a bill to be calculated. Any more info needed just ask, but hopefully someone can help!!
SELECT tblappointment.Appointment_type, tblpatient.Type_of_care, tblappointment.price, [type_of_care] & " " & [appointment_type] AS total, Switch([total]=tblpricing.price) AS Price
FROM tblappointment;
However i think it is all wrong, i want it to take this [type_of_care] & " " & [appointment_type] AS total
from this total i want it to reference with a table called tblpricing to find the correct price for that value. tblpricing is a table that contains two columns, one with the name and the other with the price, i then want to the price to be entered into tblappointment.price column for a bill to be calculated. Any more info needed just ask, but hopefully someone can help!!