Results 1 to 2 of 2

Thread: SetValue

  1. #1
    Join Date
    May 2013
    Posts
    56

    Unanswered: SetValue

    Hello, I am using Access 2013. I have forms that are for editing tables. Specifically I want to automatically fill in a date updated field when the record is updated. In one form I have it works perfectly, the other I cannot get it to work. I receive the error that the Automation object is not available. I am so confused. Can some one help me. THanks

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Not sure what an automation error has to do with something like this but to enter/update this date when existing Records are updated:

    Code:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
    
     If Not Me.NewRecord Then
      Me.DateControlName = Date
     End If
    
    End Sub


    To enter/update this date when existing Records are updated or when a New Record is created:

    Code:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
     Me.DateControlName = Date
    End Sub


    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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