Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2003
    Location
    China
    Posts
    54

    Arrow Unanswered: Auto-updating today's date on current form

    Hi,

    I am trying to store today's date in a field in responce to an update control event. I have tried:

    1. Using an update query - this changes the value in the underlying table but always shows an error when the event takes place warning about someone else changing the underlying table.

    2. In the update event section of the triggering control I have put:
    Me!txtFinalDate = Date()
    Where txtDatestamp is the control that I want to update. But this doesn't seem to do anything.

    I am pretty new at all this. Probably haven't defined the value of the FinalDate field properly in the underlying table or something.

    Any help would be appreciated.

    Cheers,

    Richard

  2. #2
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243

    Re: Auto-updating today's date on current form

    Attached you will find a similar situation (I hope)


    I made a table containing 2 fields :
    ID
    datum


    I created a form with a textBox and a button.
    In the textBox I can input a number.
    As soon as I click the button I will update the record where ID = textBox.value.
    Update the record means I put the current time in field 'datum'.


    If this is not helpfull to you, or you don't understand what I'm talking about, just let me know
    Attached Files Attached Files

  3. #3
    Join Date
    Apr 2003
    Location
    China
    Posts
    54
    Artemide,

    Thanks... looks very useful, but I can't access the code in the macro1. How should I access the code? Then I can use a similar feature in my current system.

    Cheers,

    Richard

  4. #4
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243
    Originally posted by Trumpet
    Artemide,

    Thanks... looks very useful, but I can't access the code in the macro1. How should I access the code? Then I can use a similar feature in my current system.

    Cheers,

    Richard
    You don't need the macro.
    It's still something from a previous test.
    Only the VB-code will do.

  5. #5
    Join Date
    Apr 2003
    Location
    China
    Posts
    54
    OK... got it.

    Cheers mate.

Posting Permissions

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