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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help with duplicate query



 
 
Thread Tools Display Modes
  #1  
Old February 27th, 2007, 10:02 PM posted to microsoft.public.access.queries
Jessica Murray
external usenet poster
 
Posts: 2
Default Help with duplicate query

I hope I can explain this so it makes sense....

I made a duplicate query with the wizard which is fine BUT I'd like to have
it give me only the records that duplicate since a certain date. My fields
a

Name
Date
Amount

I'd like the query to tell me only the names, dates and amounts that occured
AFTER 9/30/05.

Any help out there?
  #2  
Old February 27th, 2007, 11:58 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default Help with duplicate query

Could you post the SQL of your query?

Open in Design View; Select VIEW: SQL from the menu. Copy and paste.

You probably have something that should look roughly like the following
(minus the WHERE CLAUSE

SELECT Name, Date, Amount
FROM YourTable
WHERE Name in
(SELECT Name
FROM YourTable
WHERE Date #9/30/05#
GROUP BY Name
Having Count(Name) 1)
AND Date #9/30/05#

'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


Jessica Murray wrote:
I hope I can explain this so it makes sense....

I made a duplicate query with the wizard which is fine BUT I'd like to have
it give me only the records that duplicate since a certain date. My fields
a

Name
Date
Amount

I'd like the query to tell me only the names, dates and amounts that occured
AFTER 9/30/05.

Any help out there?

  #3  
Old February 28th, 2007, 12:05 AM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Help with duplicate query

Jessica

Open the query you already have in design view. Find the field that holds
your date value (by the way, if your fieldname is actually "Date", you and
Access will both get confused -- Access treats the word "Date" as a reserved
word. Consider changing it to SomethingDate or DateSomething, anything but
"Date").

In the row that holds selection criteria , under your field that holds the
date value, add "9/30/05" (without the quotes).

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Jessica Murray" wrote in message
...
I hope I can explain this so it makes sense....

I made a duplicate query with the wizard which is fine BUT I'd like to
have
it give me only the records that duplicate since a certain date. My fields
a

Name
Date
Amount

I'd like the query to tell me only the names, dates and amounts that
occured
AFTER 9/30/05.

Any help out there?



  #4  
Old February 28th, 2007, 03:37 PM posted to microsoft.public.access.queries
Jessica Murray
external usenet poster
 
Posts: 2
Default Help with duplicate query

Eureka Jeff! It works!

It's always something simple like that...but like I said...they never tell
you this kind of real world type stuff in the Dummies books! And really...I
try so hard and read those books till I'm about blind. It's always about that
stupid auto dealership!

Gracias Sir!

"Jeff Boyce" wrote:

Jessica

Open the query you already have in design view. Find the field that holds
your date value (by the way, if your fieldname is actually "Date", you and
Access will both get confused -- Access treats the word "Date" as a reserved
word. Consider changing it to SomethingDate or DateSomething, anything but
"Date").

In the row that holds selection criteria , under your field that holds the
date value, add "9/30/05" (without the quotes).

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Jessica Murray" wrote in message
...
I hope I can explain this so it makes sense....

I made a duplicate query with the wizard which is fine BUT I'd like to
have
it give me only the records that duplicate since a certain date. My fields
a

Name
Date
Amount

I'd like the query to tell me only the names, dates and amounts that
occured
AFTER 9/30/05.

Any help out there?




  #5  
Old February 28th, 2007, 06:21 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Help with duplicate query

De nada...

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Jessica Murray" wrote in message
...
Eureka Jeff! It works!

It's always something simple like that...but like I said...they never tell
you this kind of real world type stuff in the Dummies books! And
really...I
try so hard and read those books till I'm about blind. It's always about
that
stupid auto dealership!

Gracias Sir!

"Jeff Boyce" wrote:

Jessica

Open the query you already have in design view. Find the field that
holds
your date value (by the way, if your fieldname is actually "Date", you
and
Access will both get confused -- Access treats the word "Date" as a
reserved
word. Consider changing it to SomethingDate or DateSomething, anything
but
"Date").

In the row that holds selection criteria , under your field that holds
the
date value, add "9/30/05" (without the quotes).

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Jessica Murray" wrote in
message
...
I hope I can explain this so it makes sense....

I made a duplicate query with the wizard which is fine BUT I'd like to
have
it give me only the records that duplicate since a certain date. My
fields
a

Name
Date
Amount

I'd like the query to tell me only the names, dates and amounts that
occured
AFTER 9/30/05.

Any help out there?






 




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 11:19 PM.


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