Advanced Calculated Queries

E

Enedrox

I would like to build a slightly more advanced calculated query.

The database has a Musicals table, Customer table and Bookings table. If a
customer has 3 or more booking, they receive a 7.5% discount on all future
booking. How can I make a calculated query field that counts how many booking
are associated with the customer ID?
 
J

Jeff Boyce

Create a new query.

Add the Bookings table (I assume this contains CustomerID).

Add the Bookings table ID and the CustomerID.

Click the totals button ('sigma', looks like a sideways "M").

Use "GroupBy" on the CustomerID, "Count" on the BookingsID.

An alternate approach would be, depending on where you are trying to do
this, a DCount() function (see Access HELP for complete syntax).

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top