Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Auto Date Fillin

Discussion in 'Information Technology' started by Tony, Nov 10, 2005.

Tags:
  1. Tony

    Tony
    Expand Collapse
    Guest

    Does anyone know if it's possible to have the current date fillin a field if
    a certain button is pressed? Example, I have a database where I have a date
    last updated field and I wanted that if they press the EDIT button to change
    anything in the record that it automatically fills in the date updated field
    in with the current date. Thanks for any help!!
     
  2. Loading...

    Similar Threads Forum Date
    Opinion Is Autocomplete Evil? Some Women Take A Hard Look at Google ! Breaking News Nov 7, 2013
    Sikh News AutoZone sued for firing Everett Sikh Breaking News Sep 29, 2010
    India Singh: Centre Ready To Give Kashmir Autonomy Breaking News Aug 11, 2010
    India Paste tariff cards behind driver’s seat: Transport dept to automen Breaking News Jul 21, 2010
    Gursharan Kaur: India's First Lady's Autobiography Sikh Personalities Jun 1, 2010

  3. BruceM

    BruceM
    Expand Collapse
    Guest

    In the command button's Click event:
    Me.DateUpdated = Date

    "Tony" <Tony@discussions.microsoft.com> wrote in message
    news:BC14F62A-CE3C-442D-8DEE-D8A7FF9B1FC4@microsoft.com...
    > Does anyone know if it's possible to have the current date fillin a field
    > if
    > a certain button is pressed? Example, I have a database where I have a
    > date
    > last updated field and I wanted that if they press the EDIT button to
    > change
    > anything in the record that it automatically fills in the date updated
    > field
    > in with the current date. Thanks for any help!!
     
  4. Rick B

    Rick B
    Expand Collapse
    Guest

    You could do that, but the normal way to do this is to have the system
    change the "last update" field any time the record is changed. This happens
    whether the user wants it to or not. Your method seems to require them to
    press a button.

    If it were me, I'd simply put code in the Form's BEFORE UPDATE event. If
    you have your users logging in to the system with User-level security, you
    could even include the userid that made the change. The code would look
    like...

    TimestampField=CurrentUser() & " " & Now()



    Of course, you'll want to make sure the user cannot get to that field. It
    needs to be locked and/or disabled.



    --
    Rick B



    "Tony" <Tony@discussions.microsoft.com> wrote in message
    news:BC14F62A-CE3C-442D-8DEE-D8A7FF9B1FC4@microsoft.com...
    > Does anyone know if it's possible to have the current date fillin a field
    > if
    > a certain button is pressed? Example, I have a database where I have a
    > date
    > last updated field and I wanted that if they press the EDIT button to
    > change
    > anything in the record that it automatically fills in the date updated
    > field
    > in with the current date. Thanks for any help!!
     

Share This Page