472,777 Members | 2,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,777 software developers and data experts.

MS Access query

Hey everyone,

I think i am being kind of stupid but i can't quite work out how to do it and wondered if anyone might be able to help!? I'm using MS Access 2002 on Windows XP FYI.

I have a customer database which lists customers and related bookings (containing courses which they book their staff onto). So customer A might book 4 staff onto a NVQ 2 Business course, 3 onto an NVQ 2 Safety course and 5 onto a NVQ 3 Business course for example.

Obviously the main relationship is a one to many relationship between customers and bookings. I have separate tables listing qualifications (eg NVQ 2, NVQ 3 etc) and another listing related courses (eg NVQ 2 Business course, NVQ 3 Business course, NVQ 2 Safety course etc). These are a one to many relationship as well, so one qualification can have many courses. I have done it like this to allow you to easily add new qualifications/courses into the system.

When you select a booking for a particular customer i currently have a combo box linked to qualification and then another combo box linked to courses (which is queried by the value of the qualification combo box) hence restricting the possible course selection based on the qualification. The results of these are then put into the table.

The problem with this is i want to run a report listing all of the courses and all of the total number of learners on each, which i don't think is possible with this setup because the original qualification and course tables that list all of them don't have any direct relationship with the customer bookings table?

As a result i thought it would be more sensible to use CourseID (from the course table) within the bookings table which would then allow a one to many relationship between courses and customers and only display the qualification/course on the form for the users information, but not actually store it in the table as you have the courseID anyway.

Problem is i can't work out how to do it as ultimately what i need is once i select the second combo box the related CourseID to be inputted into another field on the form, i'm not sure how though!

I would really appreciate any help anyone could give me on this as it's really starting to confuse me and i can't work out where to go from here! If i haven't made anything clear enough or haven't given enough detail then let me know.

Thanks so much in advance,

Mar 14 '07 #1
1 1521
14,534 Expert Mod 8TB
Hi Dave

Post the metadata for all the tables concerned as it will make it easier to see what's happening.


Here is an example of how to post table MetaData :
Table Name=tblBookings
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. Field; Type; IndexInfo
  3. StudentID; Autonumber; PK
  4. Family; String; FK
  5. Name; String
  6. University; String; FK
  7. Mark; Numeric
  8. LastAttendance; Date/Time
Mar 17 '07 #2

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

Similar topics

by: Frnak McKenney | last post by:
Back when computer dinosaurs roamed the earth and the precursors to today's Internet were tiny flocks of TDMs living symbiotically with the silicon giants, tracking access to data processing...
by: Joris Kempen | last post by:
Hi people, I know that the question has come around sometimes: How to open an Access Report using ASP and export it to for example RTF. I'm trying to implement the first method of David...
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
by: bhbgroup | last post by:
I have a query on one large table. I only add one condition, i.e. a date (the SQL reads like 'where date > parameterdate'. This query is rather quick if 'parameterdate' is either explicitly...
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
by: tt40 | last post by:
Anyone know how to prevent Access 2002 from automatically breaking all the incorrect joins in a query and then automatically saving the broken query? This is what I would call stupid design...
by: InnoCreate | last post by:
Hi everyone. I've recently written a classic asp website which uses an MS Access datasource. I know this is less than an ideal data source as it has limited functionality. I have a search form on...
by: mnjkahn via AccessMonster.com | last post by:
I'm running Access 2003, modifying a query that has over 45 fields. When I right click on the field name in Query Design View, and then click Build, Access crashes before the Build window...
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
by: magickarle | last post by:
Hi, I got a pass-through query (that takes about 15 mins to process) I would like to integrate variables to it. IE: something simple: Select EmplID from empl_Lst where empl_lst.timestamp between...
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.