Results 1 to 4 of 4
  1. #1
    maxx429 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    2

    Runtime error 424 on an After Update Event

    Hi all. I hope someone can help with this issue.

    I have a Form with several Text Box controls on it. The Form is bound to a Table. What I want to happen is, after a particular text box is updated, I want to check if the value is Null. If it is, I want to set the value of a different text box to zero. If it is not Null, then I want to set the value of the same text box to =txtbox1*textbox2.

    I keep getting a Runtime 424 error Object Required, on the bold area of code below:

    Option Compare Database

    Private Sub TransAmt_AfterUpdate()

    If Me.TransAmt Is Null Then
    Me.TotalTransAmt = 0

    Else: Me.TotalTransAmt = Me.TransAmt * Me.TransQty

    End If

    End Sub



    I've been beating my head against this issue for the past few hours, so any help is greatly appreciated.

    Thanks,
    Garrett

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try

    If IsNull(Me.TransAmt) Then

    Or to also test for a zero length string use the test here:

    http://www.baldyweb.com/BeforeUpdate.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    maxx429 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    2

    Many Thanks

    Bingo! Thanks so much. Haven't done this in a long while

    Quote Originally Posted by pbaldy View Post
    Try

    If IsNull(Me.TransAmt) Then

    Or to also test for a zero length string use the test here:

    http://www.baldyweb.com/BeforeUpdate.htm

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Before Update Event Help
    By bklewis in forum Access
    Replies: 8
    Last Post: 03-25-2012, 03:58 PM
  2. Replies: 0
    Last Post: 03-11-2012, 09:19 AM
  3. Error in Runtime Only
    By drunkinmunki in forum Programming
    Replies: 7
    Last Post: 12-16-2010, 03:43 PM
  4. Before Update Event
    By randolphoralph in forum Programming
    Replies: 0
    Last Post: 06-15-2010, 09:26 AM
  5. Form does not update after event
    By pedro in forum Forms
    Replies: 10
    Last Post: 12-23-2009, 07:54 AM

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