A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Finding mis-matched records



 
 
Thread Tools Display Modes
  #1  
Old April 12th, 2008, 12:43 AM posted to microsoft.public.access
Paul Fenton
external usenet poster
 
Posts: 43
Default Finding mis-matched records

We have an application that tracks client appointments and project
progress. In the Clients table, there's a check box to indicate that
an appointment was kept. The actual appointment records are in an
Appointments table and they linked by a unique ID for each client.

We've just discovered that it's possible to check the Appointment Kept
checkbox without there being an actual appointment record in the
appointments table. What happens then is that client record will
never show up on any of our reports for Pending Estimate, Follow Up,
etc. The record's there, but can't be located with the usual queries.

I've fixed the original problem and now I want to find all the record
in the Clients table where Appointments Kept is YES, but there is no
corresponding appointment record in the Appointments table.

I need some help with this one.


Paul Fenton

  #2  
Old April 12th, 2008, 12:57 AM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Finding mis-matched records

Paul

Open the MDB into the Database window.

Click on the NEW button and select Query.

When the Query Wizard pops up, select the Unmatched query and follow the
wizard's steps.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Paul Fenton" wrote in message
news
We have an application that tracks client appointments and project
progress. In the Clients table, there's a check box to indicate that
an appointment was kept. The actual appointment records are in an
Appointments table and they linked by a unique ID for each client.

We've just discovered that it's possible to check the Appointment Kept
checkbox without there being an actual appointment record in the
appointments table. What happens then is that client record will
never show up on any of our reports for Pending Estimate, Follow Up,
etc. The record's there, but can't be located with the usual queries.

I've fixed the original problem and now I want to find all the record
in the Clients table where Appointments Kept is YES, but there is no
corresponding appointment record in the Appointments table.

I need some help with this one.


Paul Fenton



  #3  
Old April 12th, 2008, 01:29 AM posted to microsoft.public.access
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default Finding mis-matched records

"Paul Fenton" wrote in message
news
We have an application that tracks client appointments and project
progress. In the Clients table, there's a check box to indicate that
an appointment was kept. The actual appointment records are in an
Appointments table and they linked by a unique ID for each client.

We've just discovered that it's possible to check the Appointment Kept
checkbox without there being an actual appointment record in the
appointments table. What happens then is that client record will
never show up on any of our reports for Pending Estimate, Follow Up,
etc. The record's there, but can't be located with the usual queries.

I've fixed the original problem and now I want to find all the record
in the Clients table where Appointments Kept is YES, but there is no
corresponding appointment record in the Appointments table.


In your query, create an Outer Join (called a Left Join) in Access. Right
click on the Join between the 2 tables and choose the option that gives you
all of the records from the Clients table and the matching records from the
Appointments table, something like:

SELECT tblClients. *, tblAppointments.ClientID
FROM tblClients LEFT JOIN tblAppointments ON tblClients.ClientID =
tblAppointments.ClientID
WHERE (((tblAppointments.ClientID) Is Null));

--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

  #4  
Old April 15th, 2008, 06:53 PM posted to microsoft.public.access
Paul Fenton
external usenet poster
 
Posts: 43
Default Finding mis-matched records

Jeff and Arvin, thank you for the responses. Problem solved!

I hate it when I miss the obvious.


Paul Fenton
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:41 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.