Results 1 to 2 of 2
  1. #1
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126

    Automatically change Update date on another field change

    I have a form 'SportsMLBFrm' (continuous) to track team standings (win/loss). When I change either field [W], [L] the win loss [WinLoss] percent updates. I would like to have the date in the field [Updated] change to the current date when the [WinLoss] field changes. I would think some event like After Update or On Change is the way to go but I am not sure of the next step.

    Jim O

  2. #2
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    That all depends on how you did everything else. Is the forms recordsource the table or query or unbound, different ways of setting it up and each might be a little bit different of an answer. My guess is that your form is based on the table so yes the after update event is what i would do but keep in mind that the form is continuous so to update a single record you will have to reference the ID of the line in an update SQL. Something roughly like

    currentdb.execute("update form1 set date=" & date & "where formID=" & me.id.value )

    if you build it as a separate sub then you can call it from an after update event of anything on that record.
    Good luck

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

Similar Threads

  1. Field Status Change Automatically?
    By m4l4y in forum Access
    Replies: 2
    Last Post: 03-23-2016, 06:55 PM
  2. Automatically Change Number In Field
    By Scofield67 in forum Access
    Replies: 4
    Last Post: 05-18-2014, 03:46 PM
  3. Replies: 17
    Last Post: 12-20-2012, 07:56 AM
  4. Replies: 3
    Last Post: 06-03-2011, 03:09 PM
  5. Replies: 1
    Last Post: 01-26-2010, 10:36 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