Duplicate date records not showing in query.

G

Guest

I'm not sure why but my duplicate date records are not showing up in the
query. In other words if I have two or more records with the same date (like
11/09/07 and 11/09/07) only the results of one record with this date is
shown. I need all records to show even those with duplicate dates. I
checked the unique values and unique records in query properties. They're
both set to "NO". Any idea what I'm doing wrong. I have two fields only
this this simple query.
 
G

Guest

You did not say what kind of query it is. If it is a totals query there it
rolls all the dates together. Post the SQL of your query by opening the
query in design view, clicking on menu VIEW - View SQL. Highlight all, copy,
and paste in a post.
 
G

Guest

It's the grouping that is causing my problem. I'll have to do more work.
Thanks for your help.

SELECT [Table 1 Name].[Field 1 name], [Table 1 Name].[Field 2 Date]
FROM [Table 1 Name]
GROUP BY [Table 1 Name].[Field 1 name], [Table 1 Name].[ Field 2 Date]
HAVING ((([Table 1 Name].[Field 2 Date]) Between #7/1/2006# And [Enter End
Date]))
ORDER BY [Table 1 Name].[Field 1 name];
 
J

John W. Vinson

It's the grouping that is causing my problem. I'll have to do more work.
Thanks for your help.

SELECT [Table 1 Name].[Field 1 name], [Table 1 Name].[Field 2 Date]
FROM [Table 1 Name]
GROUP BY [Table 1 Name].[Field 1 name], [Table 1 Name].[ Field 2 Date]
HAVING ((([Table 1 Name].[Field 2 Date]) Between #7/1/2006# And [Enter End
Date]))
ORDER BY [Table 1 Name].[Field 1 name];

Well, you're not totalling or counting or using any other grouping features -
just *turn off the grouping*! The SQL would be

SELECT [Table 1 Name].[Field 1 name], [Table 1 Name].[Field 2 Date]
FROM [Table 1 Name]
WHERE ((([Table 1 Name].[Field 2 Date]) Between #7/1/2006#
And [Enter End Date]))
ORDER BY [Table 1 Name].[Field 1 name];


John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top