I hope someone can help me with this:
I have a simple query combining a list of names and basic details with another table containing more specific information. Some names will necessarily appear more than once and arbitrary distinctions like "John Smith 1" and "John Smith 2" are not an option, so I have been using an autonumber to keep the records distinct.
The problem is that my query is creating two records for each name that appears more than once. For example, there are two clients named 'Sophoan', each with a different id number, and the query has picked up each one twice resulting in four records (in total there are 122 records when there should only be 102). 'Unique values' is set to 'yes'.
I've researched as much as I can and am completely stuck. I've tried to tinker with sql but it always comes back with errors, I presume because there are too many fields in the query.
What am I missing? Or is a query the wrong approach and I need to find another way to combine my tables?
Project in detail: I'm building a database for a charity which has two main activities: social work and training. The database is to record their client information and the results of their interactions with clients (issues they asked for help with, results of training workshops etc.). Some clients will cross over between activities which the organisation wants to track, hence all registered clients go into one list and individual tables spin of that to collect data for each specific activity the client takes part in. This query is supposed to be my solution for combining these tables for data entry by the user.
At present I have the following tables:
- AllList (master list of client names and basic contact info; 'Social Work Register' and 'Participant Register' join to this table by 'Name')
- Social Work Register (list of social work clients with full details of each case)
- Social Work Follow-up Table (used when staff call social work clients to see how their issue is progressing; the register has too many columns to hold this as well; joined to Register by 'Client Name')
- Participants Register (list of clients for training and details of which workshops they were attended and why they were absent if they missed a session)
- Individual workshop tables x14 (each workshop includes a test and these tables records the clients answers and their score for each individual test; there will be more than 20 of these when the database is finished; all joined to the 'Participants Register' by 'Participant Name')
Queries:
- Participant Overview Query (links the attendance data from the 'Register' with the grading data from each Workshop to present a read-only overview; this one seems to work perfectly)
- Social Work Query (non-functional; intended to link the 'Client
Register' to the 'AllList' for data entry so that when a new client
is registered it creates a new record in both tables, with the
records matched together) - Participant Query (not yet attempted; as above, intended to link the 'Participant Register' to the 'AllList' for data entry)
BUT I realised that queries can't be used for data entry, so this approach seems to be a dead end. I have had some success with using subforms for data entry but I'm not sure if it's the best way.
So, what I'm basically hoping to achieve is a way to input the same data to two tables simultaneously (for new records) and have the resulting records matched together (for new entries to existing records). But it needs to be possible for the same name to appear more than once as a unique record (e.g. three individuals named John Smith).
[N.B. There are more tables that store secondary information but aren't relevant to the issue as they are not and will not be linked to any other tables.]