Results 1 to 8 of 8
  1. #1
    Aimee is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    19

    Question Automatic transfer of info from one object to another

    I have a table within my databse for which I need to know how to keep a seperate list of all of the records that have a 'tick' in a specific field. I would like the list to be updated automatically based on the 'tick' status in the original table.



    I also need to add some additional information - I need to automatically record the date that this information was added

    Im pretty new to Access, so please excuse my ignorance. Any help would be greatly appreciated.

  2. #2
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Typically, that would be done with a query against the same table, rather than a separate table. A query is always up to date.
    Code:
    SELECT (all the fields I need to see)
    FROM MyTable
    WHERE MyTable.Tick = True;
    If you also need the date/time that the field has been set to Yes, then you'd set a date/timestamp field on the same record. On the form that allows that tickbox to be set or unset, you'd have a checkbox for the tick (for example, chkTick) and a TextBox for the timestamp (for example, txtTickUpdated).

    In the AfterUpdate Event code of the checkbox control, you'd have a line that says sets the timestamp:
    Code:
    Private Sub chkTick_AfterUpdate()
      txtTickUpdated = Now()
    End Sub

  3. #3
    Aimee is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    19
    So when I update info in the main table, this will automatically update in a pre executed query? ...I thought that I would have to repeat the query each time to get the most recent output?

  4. #4
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    While you could possibly "pre-execute" a query, and store it somewhere (say, as a report) to look at later, that's not the way it normally works.

    When you open any query that is on the list in your database, you will always be executing that query against whatever data is currently in the database. When you open any form that is linked to a query, the form always fills with the current information. Any other way of designing the application wouldn't meet most user's needs.

    Did that make sense?

  5. #5
    Aimee is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    19
    It does, thank you.
    ...But that creates another problem for me; I have created a form based on a table, but whenever I check the tick box for that field, this does not show on the table, even though the rest of the written information does.
    I added the tick box field at a later date, so assumed that maybe I had to re-create the form from scratch since I edited the original table. Surly this can’t be the case...?

  6. #6
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Nope. In Design mode, Right-click the checkbox, go to the properties pane, and set the record source to the field on the table that you want the checkbox to update. that's it.

  7. #7
    Aimee is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    19
    Sorted! Thank you Dal

  8. #8
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    You're welcome. Please mark thread "Solved". Top of page, under "thread tools".

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

Similar Threads

  1. Replies: 3
    Last Post: 10-24-2012, 05:41 PM
  2. Replies: 2
    Last Post: 06-15-2012, 07:41 PM
  3. Replies: 1
    Last Post: 09-03-2011, 07:01 PM
  4. Replies: 3
    Last Post: 11-02-2010, 10:14 AM
  5. Replies: 1
    Last Post: 08-05-2010, 12:11 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