Dear Bud,
Your between goes in your where clause with an AND that I have underlined:
WHERE PostedCards.PostDate Between #10/1/2007# And #11/30/2007# AND
(((PostedCards.ClinicID) In (SELECT [ClinicID]
Hope this helps,
Kind regards
Peter
Peter T. Fairchild
Consultant en Informatique
[EMAIL PROTECTED]
+41-(0)21-800-4044 Office
+41-(0)79-715-9155 Portable
"Form and Function are one" Frank Lloyd Wright 1867 - 1959
----Message d'origine----
De: [EMAIL PROTECTED]
Date: 28.12.2007 16:25
À: <[email protected]>
Objet: [ms_access] Please Help me add a date range filter to my query
I really didn't get an answer from anyone that helped me with the date
range question. Could anyone please take a look at it again for me?
I have written a simple query that works just fine; however, I need to
add a date range filter, like this:
WHERE PostedCards.PostDate Between #10/1/2007# And #11/30/2007#
and I already have a WHERE clause and don't know where to put this one
or the proper syntax
I've attached my complete query, could someone please help me with
this, Thanks so much. Bud
Here tis:
SELECT DISTINCTROW
PostedCards.ClinicID,
PostedCards.Client,
PostedCards.PetNumber,
PostedCards.PetName,
PostedCards.VacDesc1,
PostedCards.VacDue1,
PostedCards.VacDue2,
PostedCards.VacDue3,
PostedCards.VacDue4,
PostedCards.VacDue5,
PostedCards.ClinicAddress1,
PostedCards.ClientName,
PostedCards.PetCardDate,
PostedCards.PostDate
FROM PostedCards
WHERE (((PostedCards.ClinicID) In (SELECT [ClinicID]
FROM [PostedCards] As Tmp
and
GROUP BY
[ClinicID],
[Client],
[PetNumber],
[PetName],
[VacDesc1],
[VacDue1],
[VacDue2],
[VacDue3],
[VacDue4],
[VacDue5]
HAVING Count(*)>1
And [Client] = [PostedCards].[Client]
And [PetNumber] = [PostedCards].[PetNumber]
And [PetName] = [PostedCards].[PetName]
And [VacDesc1] = [PostedCards].[VacDesc1]
And [VacDue1] = [PostedCards].[VacDue1]
And [VacDue2] = [PostedCards].[VacDue2]
And [VacDue3] = [PostedCards].[VacDue3]
And [VacDue4] = [PostedCards].[VacDue4]
And [VacDue5] = [PostedCards].[VacDue5])))
ORDER BY PostedCards.ClinicID, PostedCards.Client,
PostedCards.PetNumber, Postedcards.petcarddate;
Yahoo! Groups Links
[Non-text portions of this message have been removed]