New macro user.

HF_JBB

Registered User.
Local time
Today, 07:59
Joined
Jun 15, 2002
Messages
12
Hi, I’m doing project in access for school, but we only going to see macros next week... I was wondering if anyone could help me out here.

I got two tables, one called services (idservices, price) and another called Receipt (idreceipt,quantity, total).

I need to make a macro for "total”, so it calculates the total price of a service depending on the quantity. (quantity * price).

Any help will be appreciated, thanks
 
How does your database know a receipt goes with a specific service?

I'm thinking you left a field out of your Receipt table.

In any case, if you include both tables in a query once you have that linking field properly established, you can just create a query field: TotalPrice: Receipts.Quantity * Services.Price

The exception will be if your prices will ever change, and you need to have point-of-time data for your old Receipts. Then I'd either create a new Services entry for the updated price, or you'll have to make a field that calculates the price at the time of sale and stores it in a new field. But I'll leave that up to your teacher for the future....
 
ya i left many fields out , just wanted to post the ones i needed to link.

the way i want it to work is like this:

I'm in the Receipt Form, after i typed the quantity of the service (and all the other info...), i want the "total" to display the total price.

is there a trigger function to run my macro or do i need a button?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom