Results 1 to 6 of 6
  1. #1
    julioot is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2012
    Posts
    11

    Date up-date when change

    Hi everyone,

    Im new here and new to access. So far everything is working out for me except for one problem.


    I want my database to be able to change the date when I make a change a single change within 1 record.



    So for instance when i have a table with name, city, phone number and a date. I want access to update the date only when i change the phone number.

    Can anyone give me a clue as to how I would be able to make this happen?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You would do that in a form in the BeforeUpdate event.

  3. #3
    julioot is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2012
    Posts
    11
    Yes thank you!
    I've came to the point where my date updates everytime I update a record.

    But that's not exactually what I want. I want the date to be updated only when I change 1 spesific value.

    So far I used this guideline http://office.microsoft.com/en-us/ac...010241284.aspx Can anyone tellme what step i need to change or add to come to my desire?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You only get an AfterUpdate event for a control when the value has been change. Therefore I would suggest you use the AfterUpdate event of the control in question to change the date rather than the BeforeUpdate event of the form.

  5. #5
    julioot is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2012
    Posts
    11

    Thumbs up

    Oh, found it.

    Instead of do a before update event on the entire form. You should only apply it on the spesific value. Tryed it before, didnt work. Tryed it now. Worked instantly.

    Solved! thanks for the help

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Glad we could help.

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

Similar Threads

  1. VBA - Number to Date Change
    By fpmsi in forum Programming
    Replies: 3
    Last Post: 10-18-2011, 12:06 PM
  2. How to Change Date Format
    By bulbul4u in forum Queries
    Replies: 1
    Last Post: 04-01-2011, 03:02 PM
  3. Can i change the format of DATE () ?
    By Nokia N93 in forum Access
    Replies: 2
    Last Post: 11-27-2010, 01:34 PM
  4. Change date from another control
    By NOTLguy in forum Forms
    Replies: 3
    Last Post: 11-20-2010, 11:24 AM
  5. Change Date Into Number
    By greenbag in forum Queries
    Replies: 0
    Last Post: 11-14-2008, 04:43 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