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

  • Thread starter Thread starter Finne
  • Start date Start date
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?
 
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.
 
Thanks for replying. :)

For some reason this didn't work, but thank you anyway. :)
 
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?
 
Post the relevant Table Structure and the SQL String of
your best attempt.

Van T. Dinh
MVP (Access)
 
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.
 
To get the SQL, open the query in design view, go to the View menu and
choose SQL view. Copy and post the text.
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top