A query Query

S

Sam Goddard

Hello

I'm using Access 2003 & I've tried to create a query that lets me view
various details for all of my records based on whetherthey have a particular
date in a date/time column. The list that I get back from the query is
incomplete.

Basically this is a way of tracking people who I have sent a letter to so
that I can give them a telephone. I've asked for a list of records to be
displayed where the date at which the recipients is not null & get the same
information as when I ask for all records from the day I started. Can
anybody say why the query is not returning all of the records that are in
the table, especially as the date-specific condition is the only one I'm
asking for?

Thanks

Sam
 
W

Wayne Morgan

I understand that the criteria on the date field is the only criteria. If
all records have a date, then Is Not Null will return all records. Are you
looking for a particular date or all records that do or don't have a date?

Will you post the SQL view of the query? Just copy and paste it into a
message.
 
S

Sam Goddard

Thanks for your help so far

Basically I have a table listing all of the people in my contact directory
to whom I've sent mail to. When the mail is sent, I put the date sent in a
date column. If that date column is not null, it means that this person has
been sent a letter. I wanted to create a query of all the people I'd sent a
letter to so that I could follow that letter up & try to get some more
information from my contacts. As the system I'm using becomes more complex,
I might well change the way I search for mail by looking for those I've sent
mail to on, before or after a particular date. However, at present, none of
these methods work properly & I have about 80% of the results returned that
should be returned.

I shall now post the code:


SELECT [Contact Details].[Mail sent], [Contact Details].Company, [Contact
Details].[Business Type], [Contact Details].[First Name], [Contact
Details].Surname, [Contact Details].Tel, [Callback Details].Details,
[Callback Details].Interested, [Callback Details].Action, [Callback
Details].[Date for action], [Contact Details].website
FROM [Contact Details] INNER JOIN [Callback Details] ON [Contact Details].ID
= [Callback Details].ClientID
WHERE ((([Contact Details].[Mail sent]) Is Not Null));
 
W

Wayne Morgan

Sam,

Trying that here seems to work. I tried both "Is Not Null" and "Not Is Null"
and both worked. Are you getting records you shouldn't or not getting
records you should? Have you tried compacting and repairing the database
(Tools|Database Utilities|Compact and Repair Database...)? Doing so will
repair the indexes which are used by sorting and criteria in a query. This
will sometimes cause the wrong query results. Have you verified the data in
the field to be correct? What is the data type of the field [Mail Sent]?
Have you installed the Office, Windows, and Jet service packs for your
system? You can find the Windows and Jet service packs at
http://windowsupdate.microsoft.com and the Office updates at
http://office.microsoft.com/en-us/officeupdate/default.aspx and click on
Check For Updates.
 
Top