Results 1 to 3 of 3

Thread: timestamp

  1. #1
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    24

    Talking Unanswered: timestamp

    In the before update of my data entry form I have Me.LAST_MODIFIED = Now which gives date and time when the record is modified. (LAST_MODIFIED is a field in my query set to date/time). The form has a subform - main form has staff details and the subform has training done.

    It works OK on the main form if I make changes but not if I input data into the subform. How can I fix it?

    Thanks.
    Thomas J Marshall

  2. #2
    Join Date
    Apr 2004
    Posts
    18
    This is because the subform and ensuing data on it are subject to to separate event procedures. i.e. when you change the subform it is not triggering the main forms before_update event. It is in fact triggering the subforms own and separate before_update event.

    Within the before_update event on the subform code you'll need to insert a similar statement.

    A good way to understand what events are working and when, is to put test msgbox's on some of the events procedures and enter and update your form and subform with test data. You'll soon get to grips with when the various procs are running and why....

    Hope this helps
    Last edited by sqlappboy; 10-13-05 at 06:07.
    DAO/ADO/VB.net/VBA/Access2K/Excel2K/SQL2000/Essbase/OFA/Oracle OPM, IM, EAM/Discoverer/ SQLPlus

  3. #3
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    24

    Talking

    Quote Originally Posted by sqlappboy
    Within the before_update event on the subform code you'll need to insert a similar statement.

    A good way to understand what events are working and when, is to put test msgbox's on some of the events procedures and enter and update your form and subform with test data. You'll soon get to grips with when the various procs are running and why....

    Hope this helps
    Thanks for that. I did try to put in a similar statement but get a compile error.

    If I put in the parent name it gives an error also.
    Thomas J Marshall

Posting Permissions

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