Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Display only current day (Access 97)

    I am creating a new form that will display 4 fields (date, software, user, location). In the querry section how can I tell it do display only the records with today's date.

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Flims, Switzerland
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Display only current day (Access 97)

    Go into Design View for the form. In the form's properties, under 'Data' it has a 'RecordSource' property. This will probably just be the name of your table currently.

    Change this to

    <pre>select * from myTable where date=Date()</pre>


  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Display only current day (Access 97)

    An alternative method would depend on how you opened the form. If you use the OpenForm method from another form, you could insert a WHERE clause that specifies today's date. This gives you the flexibility of opening the form to any other date or range of dates you want.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Display only current day (Access 97)

    Is there anyway that I can tell it in the query to only display new records (todays date) instead of the in the Form section?

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Flims, Switzerland
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Display only current day (Access 97)

    Ah, is your form based on a query?

    If so, then just put =Date() in the criteria row for the date column (this is in the query designer)

Posting Permissions

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