Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Filters (Access 2000)

    I have a form that is time tracking jobs. I need for it to open only on the current date. For instance, I don't want yesterdays postings to be on today's form, however, I want all the postings from today to still show. How can I accomplish this?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filters (Access 2000)

    You can create a query that selects only todays postings. In the query grid, enter Date() in the criteria row in the Posting date column.

    Use the query as record source of the form.

    As an alternative, you can use code to filter the form.

  3. #3
    New Lounger
    Join Date
    Mar 2002
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filters (Access 2000)

    Using the Date()knocks out today's date. I have to show all the entries for the current day.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filters (Access 2000)

    I don't understand <img src=/S/confused.gif border=0 alt=confused width=15 height=20>. Today knocked out? See attached picture (date format is dd-mm-yyyy)
    Attached Images Attached Images
    • File Type: gif x.gif (2.5 KB, 0 views)

  5. #5
    New Lounger
    Join Date
    Mar 2002
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filters (Access 2000)

    I did exactly what you showed. Difference is I have my date formatted (in the table) with the "short date" template.
    Otherwise my query looks like yours and it gives me no entries for today.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filters (Access 2000)

    Just guessing now...

    Are you sure there are records for today in your table?

    Is the date field in your table a Date/Time field or a string field?

    What happens if you set the criteria to Format(Date(),"Short Date")

    If this doesn't help, perhaps somebody with a fresh perspective should look at this, I'm stumped.

  7. #7
    New Lounger
    Join Date
    Mar 2002
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filters (Access 2000)

    Yes. 5
    Date/Time field.
    Tried this with same result.
    I would welcome it!!!! <img src=/S/exclamation.gif border=0 alt=exclamation width=7 height=22>

  8. #8
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Filters (Access 2000)

    Assuming that the dates are in a date format, try this in the criteria area of the query

    (SELECT MAX([tablename].[DATE]) FROM [tablename])

    This will select the maximum date (or todays records) for the form. Of course, if there aren't any records for today, you will get the records for the latest date.

    I use this to get the latest data from tables that store multiple date records.

    HTH
    Regards,

    Gary
    (It's been a while!)

  9. #9
    New Lounger
    Join Date
    Mar 2002
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filters (Access 2000)

    Better. I got the LAST entry of 5 dates for today. Progress.

    Success!!! Original fix Date() worked. For some reason when setting the "short date" format it also captures the time. Big Problem.
    I had two tables connected in the query w/Ref. Int. and they were not matching. deleted second set of dates from second table and formatted dates in first table mm/dd/yy. Works perfectly! Thanks for everyone's help!
    Stacy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •