+ Reply to Thread
Results 1 to 11 of 11

AfterUpdate Event not Running

  1. #1
    Craig
    Guest

    AfterUpdate Event not Running

    Hi There,
    I have a userform called frmThree which has a bunch of textboxes on it, when
    I run the userform the AfterUpdate Event runs fine when I hit enter on each
    textbox when I run it as a stand alone userform (from the Visual Basic
    Editor). When I try to run the program as it is mean't... the AfterUpdate
    Event doesn't Fire.
    My program first opens frmOne, from this I click on a button to sign in,
    this brings up frmPassword,I enter the code the frmPassword userform
    hides... and shows frmTwo... on frmTwo is a commandbutton that shows
    frmThree.
    Now when I enter a number in the textbox on frmThree the AfterUpdate doesn't
    fire thus not formatting my number in the textbox. At this point frmOne,
    frmTwo and frmThree would all be in the .show mode.

    Anyone no why, this is happening?


    Craig



  2. #2
    Martin Fishlock
    Guest

    RE: AfterUpdate Event not Running

    Craig

    A shot in the dark, what is the afterupdate code and where is it asigned?

    "Craig" wrote:

    > Hi There,
    > I have a userform called frmThree which has a bunch of textboxes on it, when
    > I run the userform the AfterUpdate Event runs fine when I hit enter on each
    > textbox when I run it as a stand alone userform (from the Visual Basic
    > Editor). When I try to run the program as it is mean't... the AfterUpdate
    > Event doesn't Fire.
    > My program first opens frmOne, from this I click on a button to sign in,
    > this brings up frmPassword,I enter the code the frmPassword userform
    > hides... and shows frmTwo... on frmTwo is a commandbutton that shows
    > frmThree.
    > Now when I enter a number in the textbox on frmThree the AfterUpdate doesn't
    > fire thus not formatting my number in the textbox. At this point frmOne,
    > frmTwo and frmThree would all be in the .show mode.
    >
    > Anyone no why, this is happening?
    >
    >
    > Craig
    >
    >
    >


  3. #3
    Craig
    Guest

    Re: AfterUpdate Event not Running

    'This code is all within the frmThree Userform
    Private Sub TextBox2_AfterUpdate()
    Call Update_Inventory(2)
    End Sub
    Private Sub TextBox3_AfterUpdate()
    Call Update_Inventory(3)
    End Sub

    Public Sub Update_Inventory(TBox As Integer)
    Dim iPass as Integer
    If TBox <= 20 Then iPass = TBox + 171
    If TBox >= 20 Then iPass = TBox + 151
    frmThree.Controls("TextBox" & TBox).Text =
    Format(frmThree.Controls("TextBox" & TBox).Text, "Currency")
    If TBox <= 20 Then SpecialCount.Cells(iPass, 14).Value =
    Format(frmThree.Controls("TextBox" & TBox).Text, "Currency")
    If TBox >= 21 Then SpecialCount.Cells(iPass, 26).Value =
    Format(frmThree.Controls("TextBox" & TBox).Text, "Currency")
    frmThree.TextBox116.Text = Format(SpecialCount.Range("Z190").Value,
    "Currency")
    End Sub

    This code runs fine if I only run the frmThree Userfrom, it doesn't when
    opened through other Userforms.
    Thanks Craig





    "Martin Fishlock" <[email protected]> wrote in
    message news:[email protected]...
    > Craig
    >
    > A shot in the dark, what is the afterupdate code and where is it asigned?
    >
    > "Craig" wrote:
    >
    >> Hi There,
    >> I have a userform called frmThree which has a bunch of textboxes on it,
    >> when
    >> I run the userform the AfterUpdate Event runs fine when I hit enter on
    >> each
    >> textbox when I run it as a stand alone userform (from the Visual Basic
    >> Editor). When I try to run the program as it is mean't... the AfterUpdate
    >> Event doesn't Fire.
    >> My program first opens frmOne, from this I click on a button to sign in,
    >> this brings up frmPassword,I enter the code the frmPassword userform
    >> hides... and shows frmTwo... on frmTwo is a commandbutton that shows
    >> frmThree.
    >> Now when I enter a number in the textbox on frmThree the AfterUpdate
    >> doesn't
    >> fire thus not formatting my number in the textbox. At this point frmOne,
    >> frmTwo and frmThree would all be in the .show mode.
    >>
    >> Anyone no why, this is happening?
    >>
    >>
    >> Craig
    >>
    >>
    >>




  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Craig,

    I suspect you may have ambigious text box names. It isn't clear from your post if you are calling Update_Inventory from the other forms.

    I have cleaned your code up and added a restriction to it. If the text box isn't on frmThree then exit the routine. Look this over and let men know if I have understood you correctly or not.

    Calling the Sub:
    Update_Inventory (TextBox3)

    Updated Code:
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  5. #5
    Jim May
    Guest

    Re: AfterUpdate Event not Running

    Leith, thanks for the code;
    notices the use of

    'Get the Name of the Form the TextBox is on
    frmName = TB.Parent.Name

    Is this sort of line available generically to any Userform.?

    I went into a Userform (VBE) and selected a textbox
    txtVenName and in the immediate window did:

    ? txtVenName.Parent.Name << expexting to get frmTest
    but instead get r/t error 424 - Object required.

    Can you clarify
    Thanks,
    Jim


    "Leith Ross" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hello Craig,
    >
    > I suspect you may have ambigious text box names. It isn't clear from
    > your post if you are calling Update_Inventory from the other forms.
    >
    > I have cleaned your code up and added a restriction to it. If the text
    > box isn't on frmThree then exit the routine. Look this over and let men
    > know if I have understood you correctly or not.
    >
    > CALLING THE SUB:
    > Update_Inventory (TextBox3)
    >
    > UPDATED CODE:
    >
    > Code:
    > --------------------
    >
    > Sub Update_Inventory(ByRef TB As MSForms.TextBox)
    >
    > Dim frmName As String
    > Dim tbName As String
    > Dim tbNumber As Integer
    >
    > 'Get the Name of the Form the TextBox is on
    > frmName = TB.Parent.Name
    >
    > 'Is TextBox on frmThree?
    > If frmName <> "frmThree" Then Exit Sub
    >
    > 'Get the TextBox Name
    > tbName = TB.Name
    >
    > 'Extract the TextBox Number
    > tbNumber = Val(Mid(tbName, 8, Len(tbName) - 7))
    >
    > If tbNumber <= 20 Then iPass = tbNumber + 171
    > If tbNumber >= 21 Then iPass = tbNumber + 151
    >
    > 'Format the TextBox Text as Currency
    > TB.Text = Format(TB.Text, "Currency")
    >
    > If tbNumber <= 20 Then SpecialCount.Cells(iPass, 14).Value = TB.Text
    > If tbNumber >= 21 Then SpecialCount.Cells(iPass, 26).Value = TB.Text
    >
    > TextBox116.Text = Format(SpecialCount.Range("Z190").Value, "Currency")
    >
    > End Sub
    >
    > --------------------
    >
    > Sincerely,
    > Leith Ross
    >
    >
    > --
    > Leith Ross
    > ------------------------------------------------------------------------
    > Leith Ross's Profile:
    > http://www.excelforum.com/member.php...o&userid=18465
    > View this thread: http://www.excelforum.com/showthread...hreadid=482515
    >




  6. #6
    Tom Ogilvy
    Guest

    Re: AfterUpdate Event not Running

    txtVenName isn't an object until the userform is loaded.

    You can do that by refering to it. so in the immediate window:

    ? userform1.TextBox1.Parent.Name
    UserForm1

    In Leith's code, the userform was already loaded.

    --
    Regards,
    Tom Ogilvy




    "Jim May" <[email protected]> wrote in message
    news:aVmbf.9844$wC.5364@dukeread06...
    > Leith, thanks for the code;
    > notices the use of
    >
    > 'Get the Name of the Form the TextBox is on
    > frmName = TB.Parent.Name
    >
    > Is this sort of line available generically to any Userform.?
    >
    > I went into a Userform (VBE) and selected a textbox
    > txtVenName and in the immediate window did:
    >
    > ? txtVenName.Parent.Name << expexting to get frmTest
    > but instead get r/t error 424 - Object required.
    >
    > Can you clarify
    > Thanks,
    > Jim
    >
    >
    > "Leith Ross" <[email protected]>

    wrote
    > in message news:[email protected]...
    > >
    > > Hello Craig,
    > >
    > > I suspect you may have ambigious text box names. It isn't clear from
    > > your post if you are calling Update_Inventory from the other forms.
    > >
    > > I have cleaned your code up and added a restriction to it. If the text
    > > box isn't on frmThree then exit the routine. Look this over and let men
    > > know if I have understood you correctly or not.
    > >
    > > CALLING THE SUB:
    > > Update_Inventory (TextBox3)
    > >
    > > UPDATED CODE:
    > >
    > > Code:
    > > --------------------
    > >
    > > Sub Update_Inventory(ByRef TB As MSForms.TextBox)
    > >
    > > Dim frmName As String
    > > Dim tbName As String
    > > Dim tbNumber As Integer
    > >
    > > 'Get the Name of the Form the TextBox is on
    > > frmName = TB.Parent.Name
    > >
    > > 'Is TextBox on frmThree?
    > > If frmName <> "frmThree" Then Exit Sub
    > >
    > > 'Get the TextBox Name
    > > tbName = TB.Name
    > >
    > > 'Extract the TextBox Number
    > > tbNumber = Val(Mid(tbName, 8, Len(tbName) - 7))
    > >
    > > If tbNumber <= 20 Then iPass = tbNumber + 171
    > > If tbNumber >= 21 Then iPass = tbNumber + 151
    > >
    > > 'Format the TextBox Text as Currency
    > > TB.Text = Format(TB.Text, "Currency")
    > >
    > > If tbNumber <= 20 Then SpecialCount.Cells(iPass, 14).Value = TB.Text
    > > If tbNumber >= 21 Then SpecialCount.Cells(iPass, 26).Value = TB.Text
    > >
    > > TextBox116.Text = Format(SpecialCount.Range("Z190").Value, "Currency")
    > >
    > > End Sub
    > >
    > > --------------------
    > >
    > > Sincerely,
    > > Leith Ross
    > >
    > >
    > > --
    > > Leith Ross
    > > ------------------------------------------------------------------------
    > > Leith Ross's Profile:
    > > http://www.excelforum.com/member.php...o&userid=18465
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=482515
    > >

    >
    >




  7. #7
    Jim May
    Guest

    Re: AfterUpdate Event not Running

    Thanks Tom;
    Thanks to your help yesterday, I'm off now
    trying to better understand code via the use of the
    immediate window, as you suggested.
    .....them poor hokies,,,,, wow,,,,
    Jim

    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > txtVenName isn't an object until the userform is loaded.
    >
    > You can do that by refering to it. so in the immediate window:
    >
    > ? userform1.TextBox1.Parent.Name
    > UserForm1
    >
    > In Leith's code, the userform was already loaded.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    >
    > "Jim May" <[email protected]> wrote in message
    > news:aVmbf.9844$wC.5364@dukeread06...
    >> Leith, thanks for the code;
    >> notices the use of
    >>
    >> 'Get the Name of the Form the TextBox is on
    >> frmName = TB.Parent.Name
    >>
    >> Is this sort of line available generically to any Userform.?
    >>
    >> I went into a Userform (VBE) and selected a textbox
    >> txtVenName and in the immediate window did:
    >>
    >> ? txtVenName.Parent.Name << expexting to get frmTest
    >> but instead get r/t error 424 - Object required.
    >>
    >> Can you clarify
    >> Thanks,
    >> Jim
    >>
    >>
    >> "Leith Ross" <[email protected]>

    > wrote
    >> in message
    >> news:[email protected]...
    >> >
    >> > Hello Craig,
    >> >
    >> > I suspect you may have ambigious text box names. It isn't clear from
    >> > your post if you are calling Update_Inventory from the other forms.
    >> >
    >> > I have cleaned your code up and added a restriction to it. If the text
    >> > box isn't on frmThree then exit the routine. Look this over and let men
    >> > know if I have understood you correctly or not.
    >> >
    >> > CALLING THE SUB:
    >> > Update_Inventory (TextBox3)
    >> >
    >> > UPDATED CODE:
    >> >
    >> > Code:
    >> > --------------------
    >> >
    >> > Sub Update_Inventory(ByRef TB As MSForms.TextBox)
    >> >
    >> > Dim frmName As String
    >> > Dim tbName As String
    >> > Dim tbNumber As Integer
    >> >
    >> > 'Get the Name of the Form the TextBox is on
    >> > frmName = TB.Parent.Name
    >> >
    >> > 'Is TextBox on frmThree?
    >> > If frmName <> "frmThree" Then Exit Sub
    >> >
    >> > 'Get the TextBox Name
    >> > tbName = TB.Name
    >> >
    >> > 'Extract the TextBox Number
    >> > tbNumber = Val(Mid(tbName, 8, Len(tbName) - 7))
    >> >
    >> > If tbNumber <= 20 Then iPass = tbNumber + 171
    >> > If tbNumber >= 21 Then iPass = tbNumber + 151
    >> >
    >> > 'Format the TextBox Text as Currency
    >> > TB.Text = Format(TB.Text, "Currency")
    >> >
    >> > If tbNumber <= 20 Then SpecialCount.Cells(iPass, 14).Value = TB.Text
    >> > If tbNumber >= 21 Then SpecialCount.Cells(iPass, 26).Value = TB.Text
    >> >
    >> > TextBox116.Text = Format(SpecialCount.Range("Z190").Value, "Currency")
    >> >
    >> > End Sub
    >> >
    >> > --------------------
    >> >
    >> > Sincerely,
    >> > Leith Ross
    >> >
    >> >
    >> > --
    >> > Leith Ross
    >> > ------------------------------------------------------------------------
    >> > Leith Ross's Profile:
    >> > http://www.excelforum.com/member.php...o&userid=18465
    >> > View this thread:

    > http://www.excelforum.com/showthread...hreadid=482515
    >> >

    >>
    >>

    >
    >




  8. #8
    Tom Ogilvy
    Guest

    Re: AfterUpdate Event not Running

    > ....them poor hokies,,,,, wow,,,,

    Disappointing to say the least.

    --
    Regards,
    Tom Ogilvy

    "Jim May" <[email protected]> wrote in message
    news:xgqbf.10617$wC.163@dukeread06...
    > Thanks Tom;
    > Thanks to your help yesterday, I'm off now
    > trying to better understand code via the use of the
    > immediate window, as you suggested.
    > ....them poor hokies,,,,, wow,,,,
    > Jim
    >
    > "Tom Ogilvy" <[email protected]> wrote in message
    > news:[email protected]...
    > > txtVenName isn't an object until the userform is loaded.
    > >
    > > You can do that by refering to it. so in the immediate window:
    > >
    > > ? userform1.TextBox1.Parent.Name
    > > UserForm1
    > >
    > > In Leith's code, the userform was already loaded.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > >
    > >
    > > "Jim May" <[email protected]> wrote in message
    > > news:aVmbf.9844$wC.5364@dukeread06...
    > >> Leith, thanks for the code;
    > >> notices the use of
    > >>
    > >> 'Get the Name of the Form the TextBox is on
    > >> frmName = TB.Parent.Name
    > >>
    > >> Is this sort of line available generically to any Userform.?
    > >>
    > >> I went into a Userform (VBE) and selected a textbox
    > >> txtVenName and in the immediate window did:
    > >>
    > >> ? txtVenName.Parent.Name << expexting to get frmTest
    > >> but instead get r/t error 424 - Object required.
    > >>
    > >> Can you clarify
    > >> Thanks,
    > >> Jim
    > >>
    > >>
    > >> "Leith Ross" <[email protected]>

    > > wrote
    > >> in message
    > >> news:[email protected]...
    > >> >
    > >> > Hello Craig,
    > >> >
    > >> > I suspect you may have ambigious text box names. It isn't clear from
    > >> > your post if you are calling Update_Inventory from the other forms.
    > >> >
    > >> > I have cleaned your code up and added a restriction to it. If the

    text
    > >> > box isn't on frmThree then exit the routine. Look this over and let

    men
    > >> > know if I have understood you correctly or not.
    > >> >
    > >> > CALLING THE SUB:
    > >> > Update_Inventory (TextBox3)
    > >> >
    > >> > UPDATED CODE:
    > >> >
    > >> > Code:
    > >> > --------------------
    > >> >
    > >> > Sub Update_Inventory(ByRef TB As MSForms.TextBox)
    > >> >
    > >> > Dim frmName As String
    > >> > Dim tbName As String
    > >> > Dim tbNumber As Integer
    > >> >
    > >> > 'Get the Name of the Form the TextBox is on
    > >> > frmName = TB.Parent.Name
    > >> >
    > >> > 'Is TextBox on frmThree?
    > >> > If frmName <> "frmThree" Then Exit Sub
    > >> >
    > >> > 'Get the TextBox Name
    > >> > tbName = TB.Name
    > >> >
    > >> > 'Extract the TextBox Number
    > >> > tbNumber = Val(Mid(tbName, 8, Len(tbName) - 7))
    > >> >
    > >> > If tbNumber <= 20 Then iPass = tbNumber + 171
    > >> > If tbNumber >= 21 Then iPass = tbNumber + 151
    > >> >
    > >> > 'Format the TextBox Text as Currency
    > >> > TB.Text = Format(TB.Text, "Currency")
    > >> >
    > >> > If tbNumber <= 20 Then SpecialCount.Cells(iPass, 14).Value = TB.Text
    > >> > If tbNumber >= 21 Then SpecialCount.Cells(iPass, 26).Value = TB.Text
    > >> >
    > >> > TextBox116.Text = Format(SpecialCount.Range("Z190").Value,

    "Currency")
    > >> >
    > >> > End Sub
    > >> >
    > >> > --------------------
    > >> >
    > >> > Sincerely,
    > >> > Leith Ross
    > >> >
    > >> >
    > >> > --
    > >> > Leith Ross
    > >>

    > ------------------------------------------------------------------------
    > >> > Leith Ross's Profile:
    > >> > http://www.excelforum.com/member.php...o&userid=18465
    > >> > View this thread:

    > > http://www.excelforum.com/showthread...hreadid=482515
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >




  9. #9
    Craig
    Guest

    Re: AfterUpdate Event not Running

    I understand the code Leith shared... but I'm still not getting the required
    results!

    Private Sub TextBox2_AfterUpdate()
    Call Update_Inventory(TextBox2)
    End Sub

    The procedure Update_Inventory is located within the same Userform
    I've put break points in the code to see where the error is.

    the code is not getting past the:
    If frmName <> "frmPhysical" Then Exit Sub

    The frmName that appears is "Frame1" which is the frame holding 20 textboxes
    on the frmPhysical UserForm.


    Craig



    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    >> ....them poor hokies,,,,, wow,,,,

    >
    > Disappointing to say the least.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Jim May" <[email protected]> wrote in message
    > news:xgqbf.10617$wC.163@dukeread06...
    >> Thanks Tom;
    >> Thanks to your help yesterday, I'm off now
    >> trying to better understand code via the use of the
    >> immediate window, as you suggested.
    >> ....them poor hokies,,,,, wow,,,,
    >> Jim
    >>
    >> "Tom Ogilvy" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > txtVenName isn't an object until the userform is loaded.
    >> >
    >> > You can do that by refering to it. so in the immediate window:
    >> >
    >> > ? userform1.TextBox1.Parent.Name
    >> > UserForm1
    >> >
    >> > In Leith's code, the userform was already loaded.
    >> >
    >> > --
    >> > Regards,
    >> > Tom Ogilvy
    >> >
    >> >
    >> >
    >> >
    >> > "Jim May" <[email protected]> wrote in message
    >> > news:aVmbf.9844$wC.5364@dukeread06...
    >> >> Leith, thanks for the code;
    >> >> notices the use of
    >> >>
    >> >> 'Get the Name of the Form the TextBox is on
    >> >> frmName = TB.Parent.Name
    >> >>
    >> >> Is this sort of line available generically to any Userform.?
    >> >>
    >> >> I went into a Userform (VBE) and selected a textbox
    >> >> txtVenName and in the immediate window did:
    >> >>
    >> >> ? txtVenName.Parent.Name << expexting to get frmTest
    >> >> but instead get r/t error 424 - Object required.
    >> >>
    >> >> Can you clarify
    >> >> Thanks,
    >> >> Jim
    >> >>
    >> >>
    >> >> "Leith Ross" <[email protected]>
    >> > wrote
    >> >> in message
    >> >> news:[email protected]...
    >> >> >
    >> >> > Hello Craig,
    >> >> >
    >> >> > I suspect you may have ambigious text box names. It isn't clear from
    >> >> > your post if you are calling Update_Inventory from the other forms.
    >> >> >
    >> >> > I have cleaned your code up and added a restriction to it. If the

    > text
    >> >> > box isn't on frmThree then exit the routine. Look this over and let

    > men
    >> >> > know if I have understood you correctly or not.
    >> >> >
    >> >> > CALLING THE SUB:
    >> >> > Update_Inventory (TextBox3)
    >> >> >
    >> >> > UPDATED CODE:
    >> >> >
    >> >> > Code:
    >> >> > --------------------
    >> >> >
    >> >> > Sub Update_Inventory(ByRef TB As MSForms.TextBox)
    >> >> >
    >> >> > Dim frmName As String
    >> >> > Dim tbName As String
    >> >> > Dim tbNumber As Integer
    >> >> >
    >> >> > 'Get the Name of the Form the TextBox is on
    >> >> > frmName = TB.Parent.Name
    >> >> >
    >> >> > 'Is TextBox on frmThree?
    >> >> > If frmName <> "frmThree" Then Exit Sub
    >> >> >
    >> >> > 'Get the TextBox Name
    >> >> > tbName = TB.Name
    >> >> >
    >> >> > 'Extract the TextBox Number
    >> >> > tbNumber = Val(Mid(tbName, 8, Len(tbName) - 7))
    >> >> >
    >> >> > If tbNumber <= 20 Then iPass = tbNumber + 171
    >> >> > If tbNumber >= 21 Then iPass = tbNumber + 151
    >> >> >
    >> >> > 'Format the TextBox Text as Currency
    >> >> > TB.Text = Format(TB.Text, "Currency")
    >> >> >
    >> >> > If tbNumber <= 20 Then SpecialCount.Cells(iPass, 14).Value =
    >> >> > TB.Text
    >> >> > If tbNumber >= 21 Then SpecialCount.Cells(iPass, 26).Value =
    >> >> > TB.Text
    >> >> >
    >> >> > TextBox116.Text = Format(SpecialCount.Range("Z190").Value,

    > "Currency")
    >> >> >
    >> >> > End Sub
    >> >> >
    >> >> > --------------------
    >> >> >
    >> >> > Sincerely,
    >> >> > Leith Ross
    >> >> >
    >> >> >
    >> >> > --
    >> >> > Leith Ross
    >> >>

    >> ------------------------------------------------------------------------
    >> >> > Leith Ross's Profile:
    >> >> > http://www.excelforum.com/member.php...o&userid=18465
    >> >> > View this thread:
    >> > http://www.excelforum.com/showthread...hreadid=482515
    >> >> >
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >




  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Craig,

    Since you are not calling Update_Inventory from any of the other Forms, you can remove "If frmName <> ""frmPhysical Then Exit Sub" from the code. I added this as a troubleshooting aid in case Update_Inventory were being called from other Forms.

    I had assumed the TextBoxes were directly on the Form. The Parent property returns the object that holds the TextBox. Since it is a Frame, the code returns the Frame name, not the Form name. Remove the If statement and it should work.

    The After_Update event fires once the user presses enter, or clciks on another control. If your code is still not returning the correct result, there is a problem somewhere else in the program.

    Sincerely,
    Leith Ross
    Last edited by Leith Ross; 11-06-2005 at 05:00 PM.

  11. #11
    Craig
    Guest

    Re: AfterUpdate Event not Running

    Thanks... I did remove "If frmName <> ""frmPhysical Then Exit Sub", now
    everything works fine.
    Thanks again!
    Craig

    "Leith Ross" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hello Craig,
    >
    > Since you are not calling Update_Inventory from any of the other Forms,
    > you can remove "If frmName <> ""frmPhysical Then Exit Sub" from the
    > code. I added this as a troubleshooting aid iin case Update_Inventory
    > were being called from other Forms.
    >
    > I had asssumed the TextBoxes were directly on the Form. The Parent
    > property returns the object that holds the TextBox. Since it is a
    > Frame, the code returns the Frame name, not the Form name. Remove the
    > If statement and it should work.
    >
    > The *After_Update* event fires once the user presses enter, or clciks
    > on another control. If your code is still returning the correct result,
    > there is a problem somewhere else in the program.
    >
    > Sincerely,
    > Leith Ross
    >
    >
    > --
    > Leith Ross
    > ------------------------------------------------------------------------
    > Leith Ross's Profile:
    > http://www.excelforum.com/member.php...o&userid=18465
    > View this thread: http://www.excelforum.com/showthread...hreadid=482515
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1