Question about criteria; recordset list items ordered since 12/1/00

F

Finne

How do I add criteria to a field so that the recordset
will only list items (say, backpacks) that have been
ordered since 12/1/00?
 
W

Wayne Morgan

In the query design grid, go to the criteria box below the field name and
enter
= #12/1/2000#

The # are "date delimiters". Without them, Access would assume 12 divided by
1 divided by 0 or 2000, depending on how you typed it. Also, I recommend 4
digit years. If you don't use US format, I believe it needs to be in US
format for the query to work properly.
 
J

John Vinson

Finne said:
How do I add criteria to a field so that the recordset
will only list items (say, backpacks) that have been
ordered since 12/1/00?

Note that Access date literals assume American (month-day-year) format so
this date corresponds to December 1, not January 12 - might this be why it's
not working?

Assuming your table has a date/time field for the saledate, Wayne's
suggested criterion really should work! If it doesn't, please post the SQL
view of the query and describe in what way it "doesn't work" - do you get no
results even though you should, or do you get results you shouldn't, or what?
 
V

Van T. Dinh

Post the relevant Table Structure and the SQL String of
your best attempt.

Van T. Dinh
MVP (Access)
 
G

Guest

I'm not sure what a SQL String is, but the Table is
called tblCategories and the field I'm working with is
called CategoryName.
 
W

Wayne Morgan

To get the SQL, open the query in design view, go to the View menu and
choose SQL view. Copy and post the text.
 
V

Van T. Dinh

Wayne showed you how to get the SQL but you will also need
to provide more details about your Tables.

You only mentioned tblCategories in the last post but in
your original post, you wrote about "items that have been
ordered since 12/1/00". Surely by normal naming
convention, tblCategories simply have different category
names and you are likely to have a tblItems and tblOrders
somewhere???

Since you want to seta date criteria, it is reasonable to
assumed you have a Field OrderDate somewhere in your
database???

HTH
Van T. Dinh
MVP (Access)
 
Top