Results 1 to 7 of 7
  1. #1
    mbonning is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2011
    Posts
    3

    Question Automatically show previous dates.

    I am creating an Access 2007 datadase. I have a field labeled "Current date" where I would like to manually input a date. I have also created 10 Past date fields labeled "Past 1" through "Past 10". I would like these dates to automatically show the 10 most recent dates that I have entered in the "Current Date" field respectively. How do I make this happen? All fields are a Date/Time with a short date format.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    is the current date field a bound or unbound text box?

    If it's unbound there's no real way to save the data unless you create a table specifically to store the dates you're looking up. Then you'd have to add add some sort of mechanism to remove the oldest date and add the newest date. I'm assuming you are doing this so you have some sort of record of what you have searched for or do you have some other purpose in mind?

  3. #3
    mbonning is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2011
    Posts
    3
    The "Current Date" field is bound. I am trying to show the last 10 most recent times that the "Current Date" field has been updated.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Are you keeping a log of when a record is changed and the date it was changed? If you are updating the same record field as you go along there's no way to retrieve update information that I know of. If you want to be able to track who and when a record was changed you'd have to keep a physical log somewhere in your database.

    If you don't plan on doing anything with the data other than having it available for review you may be able to use a multi value text box. Normally I would say never, never, never use them but if you don't intend to try and link any of the data in them and are strictly using them for reference it might be a solution to write the update person and date/time to a single field.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    It sounds like your data structure is n iot normalized, Can you show us picture of your tables and relationships?

  6. #6
    mbonning is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2011
    Posts
    3
    I have attached a copy of the database. All I am trying to do is keep a record of the 10 most recent times that I have performed a test. I want to manually input the "Current Test" date and have the database update all of the "Past" fields. Any ideas?

  7. #7
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    This is a bad table design. Read about normalizing your database. Let's assume you have 3 different test types what you want to do is have a table that has your test types (with an unique identifier/autonumber field). Then a second table that contains it's on autonumber unique identifier, the testID from your first table and the test date.

    Then you can use a SELECT TOP X query to return the x most recent records.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 08-01-2011, 09:30 AM
  2. display all dates between two dates
    By KenThompson in forum Access
    Replies: 8
    Last Post: 02-23-2011, 01:11 PM
  3. Automatically updating dates
    By cinciphantom in forum Programming
    Replies: 0
    Last Post: 02-15-2011, 04:33 PM
  4. Mixed dates - show only complete dates?
    By weeblesue in forum Queries
    Replies: 3
    Last Post: 10-27-2010, 02:15 PM
  5. Need report to show dates
    By Brian62 in forum Reports
    Replies: 2
    Last Post: 11-20-2009, 12:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums