Solved Query Show records before a date on a form (1 Viewer)

Number11

Member
Local time
Today, 14:26
Joined
Jan 29, 2020
Messages
607
So i need to have a query being back all records added before a date on a form.

Tried this but didnt work
<[Requests].[Date]

get a prompt

1645617260413.png
 

June7

AWF VIP
Local time
Today, 06:26
Joined
Mar 9, 2014
Messages
5,423
Try:

< Forms!Requests.Date

Advise not to use reserved words as names. Date is a reserved word.
 

Number11

Member
Local time
Today, 14:26
Joined
Jan 29, 2020
Messages
607
Try:

< Forms!Requests.Date

Advise not to use reserved words as names. Date is a reserved word.
Thanks changing this to

< [Forms]![Requests].[Date]

worked
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:26
Joined
Feb 19, 2002
Messages
42,970
1. that shouldn't work. Please post the query.
2. When you created the column named "Date", Access told you not to but you ignored the warning. You will have trouble in code modules unless you change the column name to be NOT a function name and NOT a property name. embedded spaces and special characters are poor practice but you can usually get by with them except they will also cause strange situations in code under certain circumstances.

Look at the example in this database to see what happens when you name your columns using the two worst offenders - Name and Date.
 

Attachments

  • UsefulCode_20220216.zip
    124.2 KB · Views: 194

Users who are viewing this thread

Top Bottom