Dmonkyking
Technical User
Hi, I've been trying to figure out how to have an Access query display only records with a certain date range, regardless of year. For example, I want the database to list records that have dates between June 1 and June 10, but using a wildcard as a year so it will show all years. Using between apperently doesn't seem to work with wildcards on dates because I get a data type mismatch, unless I'm doing something wrong and I haven't found out how to use Like with date ranges. This is what I have:
SELECT Payment.AmtPaid, Firm.[Firm#], Payment.DatePaid, Payment.[Payment#]
FROM Firm INNER JOIN Payment ON Firm.[Firm#] = Payment.[Firm#]
WHERE (((Firm.[Firm#])="1115") AND ((Payment.DatePaid) Like "6/3/*"))
ORDER BY Payment.DatePaid;
I used "6/3/*" because I was testing the wildcard out. Am I missing something here?
SELECT Payment.AmtPaid, Firm.[Firm#], Payment.DatePaid, Payment.[Payment#]
FROM Firm INNER JOIN Payment ON Firm.[Firm#] = Payment.[Firm#]
WHERE (((Firm.[Firm#])="1115") AND ((Payment.DatePaid) Like "6/3/*"))
ORDER BY Payment.DatePaid;
I used "6/3/*" because I was testing the wildcard out. Am I missing something here?