By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,905 Members | 1,783 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,905 IT Pros & Developers. It's quick & easy.

Access Report - need a lil help.

P: 3
okay so i am writing a booking program (using 3 slots per day) and am having some difficulty with one of the reports.
i want the report to show details such as

percentage usage of each slot eg. Monday morning for month may slot usage - 45%

if anyone could point me in the right direction it would be much appreciated.

Some info that might help -

Tables: tblCustomer tblPrice tblSlotID tblSlotBooked

customer table - stores customer info, name address etc. prim key is CustomerID

tblPrice - this just stores the price of various bookings as i forgot to include this in the SlotID table and am too lazy to go back and add them into that >.>

tblSlotID - this table stores all the dates and times that are possible to booked (there are pre defined as the program only needs to work for a certian ammount of time)

tblSlotBooked - this stores the information of the slot that the customer wants to book

if anyone could help i would be soo greatfull as i have limited experience with access.

thanks!
Apr 29 '06 #1
Share this Question
Share on Google+
2 Replies


100+
P: 135
My first question would be, do the tables that are related to each other have "keys" that join them. Each table should have a primary Key (Usually the ID field) and a foreign key field for the related tables.

Example would be: tblPersonnel would have iPersonnelID, sLastName, sFirstName then tblPhoneNumbers would have iPhoneNumberID, fkPersonnelID, iPrefix, iNumber.

Then your query would Be

Expand|Select|Wrap|Line Numbers
  1.  
  2. "SELECT p.sLastName, p.sFirstName, pn.iPrefix, pn.iNumber from tblPersonnel p Left Join tblPhoneNumbers pn on p.iPersonnelID = pn.fkPersonnelID"
  3.  
Your report would be based off the query so your first step would to be a query that shows the information you want.
Apr 29 '06 #2

P: 3
yes i have the primary key for each table and the relationships are set up using foreign keys etc. ill give that piece of code a go and work from there - thanks for the help.
May 1 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.