AfterUpdate For TextBox Not Launching?
Author |
Message |
byman203 #1 / 10
|
 AfterUpdate For TextBox Not Launching?
I experimentally placed some msgbox code in the AfterUpdate event for a bound textbox control but it doesn't seem to launch. Private Sub txtFileArriveDate_AfterUpdate() MsgBox "hello" End Sub I tried moving to another control on the form (after changing the text) but it doesn't launch then (no msgbox prompt). Nor does it launch when I change to a different record. How and when does this event trigger? Is there, maybe, a property setting somewhere to set to activate it? By the way, the table underlying the control gets updated OK and I can run the "form's" AfterUpdate event fine. Thanks, byman2030
|
Wed, 05 Nov 2008 06:25:23 GMT |
|
 |
Douglas J. Steel #2 / 10
|
 AfterUpdate For TextBox Not Launching?
Did you link your routine to the event for the text box? (The linkage doesn't usually happen automatically). Go to the properties to the text box and look at whether there's anything beside the AfterUpdate event. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please)
Quote: >I experimentally placed some msgbox code in the AfterUpdate event for a > bound textbox control but it doesn't seem to launch. > Private Sub txtFileArriveDate_AfterUpdate() > MsgBox "hello" > End Sub > I tried moving to another control on the form (after changing the text) > but > it doesn't launch then (no msgbox prompt). > Nor does it launch when I change to a different record. > How and when does this event trigger? Is there, maybe, a property setting > somewhere to set to activate it? > By the way, the table underlying the control gets updated OK and I can > run > the "form's" AfterUpdate event fine. > Thanks, > byman2030
|
Wed, 05 Nov 2008 07:11:24 GMT |
|
 |
byman203 #3 / 10
|
 AfterUpdate For TextBox Not Launching?
I placed Msgbox "hello" within the white space of the procedure but I have done nothing else that might be called linking. Private Sub txtFileArriveDate_AfterUpdate() MsgBox "hello" End Sub The property sheet says [Event Procedure] next to the AfterUpdateEvent for the textbox control. I am using Access2000 in case that makes a difference
Quote: > Did you link your routine to the event for the text box? (The linkage > doesn't usually happen automatically). Go to the properties to the text box > and look at whether there's anything beside the AfterUpdate event. > -- > Doug Steele, Microsoft Access MVP > http://I.Am/DougSteele > (no private e-mails, please)
> >I experimentally placed some msgbox code in the AfterUpdate event for a > > bound textbox control but it doesn't seem to launch. > > Private Sub txtFileArriveDate_AfterUpdate() > > MsgBox "hello" > > End Sub > > I tried moving to another control on the form (after changing the text) > > but > > it doesn't launch then (no msgbox prompt). > > Nor does it launch when I change to a different record. > > How and when does this event trigger? Is there, maybe, a property setting > > somewhere to set to activate it? > > By the way, the table underlying the control gets updated OK and I can > > run > > the "form's" AfterUpdate event fine. > > Thanks, > > byman2030
|
Wed, 05 Nov 2008 22:08:41 GMT |
|
 |
Douglas J. Steel #4 / 10
|
 AfterUpdate For TextBox Not Launching?
If you click on the ellipsis (...) to the right of the [Event Procedure], does it take you to your routine? If not, perhaps you misspelled the name of the control in your code (txtFileArriveDate) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please)
Quote: >I placed Msgbox "hello" within the white space of the procedure but I >have > done nothing else that might be called linking. > Private Sub txtFileArriveDate_AfterUpdate() > MsgBox "hello" > End Sub > The property sheet says [Event Procedure] next to the AfterUpdateEvent for > the textbox control. > I am using Access2000 in case that makes a difference
>> Did you link your routine to the event for the text box? (The linkage >> doesn't usually happen automatically). Go to the properties to the text > box >> and look at whether there's anything beside the AfterUpdate event. >> -- >> Doug Steele, Microsoft Access MVP >> http://I.Am/DougSteele >> (no private e-mails, please)
>> >I experimentally placed some msgbox code in the AfterUpdate event for a >> > bound textbox control but it doesn't seem to launch. >> > Private Sub txtFileArriveDate_AfterUpdate() >> > MsgBox "hello" >> > End Sub >> > I tried moving to another control on the form (after changing the text) >> > but >> > it doesn't launch then (no msgbox prompt). >> > Nor does it launch when I change to a different record. >> > How and when does this event trigger? Is there, maybe, a property > setting >> > somewhere to set to activate it? >> > By the way, the table underlying the control gets updated OK and I can >> > run >> > the "form's" AfterUpdate event fine. >> > Thanks, >> > byman2030
|
Wed, 05 Nov 2008 22:20:51 GMT |
|
 |
byman203 #5 / 10
|
 AfterUpdate For TextBox Not Launching?
Yes, clicking on the ellipsis dots takes me to the routine.
Quote: > If you click on the ellipsis (...) to the right of the [Event Procedure], > does it take you to your routine? If not, perhaps you misspelled the name of > the control in your code (txtFileArriveDate) > -- > Doug Steele, Microsoft Access MVP > http://I.Am/DougSteele > (no private e-mails, please)
> >I placed Msgbox "hello" within the white space of the procedure but I > >have > > done nothing else that might be called linking. > > Private Sub txtFileArriveDate_AfterUpdate() > > MsgBox "hello" > > End Sub > > The property sheet says [Event Procedure] next to the AfterUpdateEvent for > > the textbox control. > > I am using Access2000 in case that makes a difference
> >> Did you link your routine to the event for the text box? (The linkage > >> doesn't usually happen automatically). Go to the properties to the text > > box > >> and look at whether there's anything beside the AfterUpdate event. > >> -- > >> Doug Steele, Microsoft Access MVP > >> http://I.Am/DougSteele > >> (no private e-mails, please)
> >> >I experimentally placed some msgbox code in the AfterUpdate event for a > >> > bound textbox control but it doesn't seem to launch. > >> > Private Sub txtFileArriveDate_AfterUpdate() > >> > MsgBox "hello" > >> > End Sub > >> > I tried moving to another control on the form (after changing the text) > >> > but > >> > it doesn't launch then (no msgbox prompt). > >> > Nor does it launch when I change to a different record. > >> > How and when does this event trigger? Is there, maybe, a property > > setting > >> > somewhere to set to activate it? > >> > By the way, the table underlying the control gets updated OK and I can > >> > run > >> > the "form's" AfterUpdate event fine. > >> > Thanks, > >> > byman2030
|
Wed, 05 Nov 2008 23:47:35 GMT |
|
 |
byman203 #6 / 10
|
 AfterUpdate For TextBox Not Launching?
I just created a new auto form for test purposes and the AfterUpdate event works there Ok. Its just not working on the form I developed in design view.
Quote: > If you click on the ellipsis (...) to the right of the [Event Procedure], > does it take you to your routine? If not, perhaps you misspelled the name of > the control in your code (txtFileArriveDate) > -- > Doug Steele, Microsoft Access MVP > http://I.Am/DougSteele > (no private e-mails, please)
> >I placed Msgbox "hello" within the white space of the procedure but I > >have > > done nothing else that might be called linking. > > Private Sub txtFileArriveDate_AfterUpdate() > > MsgBox "hello" > > End Sub > > The property sheet says [Event Procedure] next to the AfterUpdateEvent for > > the textbox control. > > I am using Access2000 in case that makes a difference
> >> Did you link your routine to the event for the text box? (The linkage > >> doesn't usually happen automatically). Go to the properties to the text > > box > >> and look at whether there's anything beside the AfterUpdate event. > >> -- > >> Doug Steele, Microsoft Access MVP > >> http://I.Am/DougSteele > >> (no private e-mails, please)
> >> >I experimentally placed some msgbox code in the AfterUpdate event for a > >> > bound textbox control but it doesn't seem to launch. > >> > Private Sub txtFileArriveDate_AfterUpdate() > >> > MsgBox "hello" > >> > End Sub > >> > I tried moving to another control on the form (after changing the text) > >> > but > >> > it doesn't launch then (no msgbox prompt). > >> > Nor does it launch when I change to a different record. > >> > How and when does this event trigger? Is there, maybe, a property > > setting > >> > somewhere to set to activate it? > >> > By the way, the table underlying the control gets updated OK and I can > >> > run > >> > the "form's" AfterUpdate event fine. > >> > Thanks, > >> > byman2030
|
Wed, 05 Nov 2008 23:55:07 GMT |
|
 |
byman203 #7 / 10
|
 AfterUpdate For TextBox Not Launching?
OK, I just discovered what may be the problem. Before, I had been entering all my changes by clicking or tabbing into the textbox and then setting the date with alt+arrow keys that programmatically changed the date up or down in the textbox control. When I would test for the AfterUpdateEvent it didn't launch. However, I just happened to use the number keys this time to change the date, and the "hello" message appeared when I tabbed out . So, it would seem, the AfterUpdateEvent doesn't launch for changes made programmatically, only for changes made directly by the keyboard. byman2030
Quote: > I just created a new auto form for test purposes and the AfterUpdate event > works there Ok. > Its just not working on the form I developed in design view.
> > If you click on the ellipsis (...) to the right of the [Event Procedure], > > does it take you to your routine? If not, perhaps you misspelled the name > of > > the control in your code (txtFileArriveDate) > > -- > > Doug Steele, Microsoft Access MVP > > http://I.Am/DougSteele > > (no private e-mails, please)
> > >I placed Msgbox "hello" within the white space of the procedure but I > > >have > > > done nothing else that might be called linking. > > > Private Sub txtFileArriveDate_AfterUpdate() > > > MsgBox "hello" > > > End Sub > > > The property sheet says [Event Procedure] next to the AfterUpdateEvent > for > > > the textbox control. > > > I am using Access2000 in case that makes a difference
> > >> Did you link your routine to the event for the text box? (The linkage > > >> doesn't usually happen automatically). Go to the properties to the text > > > box > > >> and look at whether there's anything beside the AfterUpdate event. > > >> -- > > >> Doug Steele, Microsoft Access MVP > > >> http://I.Am/DougSteele > > >> (no private e-mails, please)
> > >> >I experimentally placed some msgbox code in the AfterUpdate event for > a > > >> > bound textbox control but it doesn't seem to launch. > > >> > Private Sub txtFileArriveDate_AfterUpdate() > > >> > MsgBox "hello" > > >> > End Sub > > >> > I tried moving to another control on the form (after changing the > text) > > >> > but > > >> > it doesn't launch then (no msgbox prompt). > > >> > Nor does it launch when I change to a different record. > > >> > How and when does this event trigger? Is there, maybe, a property > > > setting > > >> > somewhere to set to activate it? > > >> > By the way, the table underlying the control gets updated OK and I > can > > >> > run > > >> > the "form's" AfterUpdate event fine. > > >> > Thanks, > > >> > byman2030
|
Thu, 06 Nov 2008 01:45:11 GMT |
|
 |
Douglas J. Steel #8 / 10
|
 AfterUpdate For TextBox Not Launching?
That's absolutely correct. I would have suggested it, but I assumed your comment about "after changing the text" meant you had keyed additional text in. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please)
Quote: > OK, I just discovered what may be the problem. > Before, I had been entering all my changes by clicking or tabbing into the > textbox and then setting the date with alt+arrow keys that > programmatically > changed the date up or down in the textbox control. > When I would test for the AfterUpdateEvent it didn't launch. > However, I just happened to use the number keys this time to change the > date, and the "hello" message appeared when I tabbed out . > So, it would seem, the AfterUpdateEvent doesn't launch for changes made > programmatically, only for changes made directly by the keyboard. > byman2030
>> I just created a new auto form for test purposes and the AfterUpdate >> event >> works there Ok. >> Its just not working on the form I developed in design view.
>> > If you click on the ellipsis (...) to the right of the [Event > Procedure], >> > does it take you to your routine? If not, perhaps you misspelled the > name >> of >> > the control in your code (txtFileArriveDate) >> > -- >> > Doug Steele, Microsoft Access MVP >> > http://I.Am/DougSteele >> > (no private e-mails, please)
>> > >I placed Msgbox "hello" within the white space of the procedure but >> > >I >> > >have >> > > done nothing else that might be called linking. >> > > Private Sub txtFileArriveDate_AfterUpdate() >> > > MsgBox "hello" >> > > End Sub >> > > The property sheet says [Event Procedure] next to the >> > > AfterUpdateEvent >> for >> > > the textbox control. >> > > I am using Access2000 in case that makes a difference
>> > > message
>> > >> Did you link your routine to the event for the text box? (The >> > >> linkage >> > >> doesn't usually happen automatically). Go to the properties to the > text >> > > box >> > >> and look at whether there's anything beside the AfterUpdate event. >> > >> -- >> > >> Doug Steele, Microsoft Access MVP >> > >> http://I.Am/DougSteele >> > >> (no private e-mails, please)
>> > >> >I experimentally placed some msgbox code in the AfterUpdate event > for >> a >> > >> > bound textbox control but it doesn't seem to launch. >> > >> > Private Sub txtFileArriveDate_AfterUpdate() >> > >> > MsgBox "hello" >> > >> > End Sub >> > >> > I tried moving to another control on the form (after changing the >> text) >> > >> > but >> > >> > it doesn't launch then (no msgbox prompt). >> > >> > Nor does it launch when I change to a different record. >> > >> > How and when does this event trigger? Is there, maybe, a property >> > > setting >> > >> > somewhere to set to activate it? >> > >> > By the way, the table underlying the control gets updated OK and >> > >> > I >> can >> > >> > run >> > >> > the "form's" AfterUpdate event fine. >> > >> > Thanks, >> > >> > byman2030
|
Thu, 06 Nov 2008 02:01:00 GMT |
|
 |
byman203 #9 / 10
|
 AfterUpdate For TextBox Not Launching?
Agreed. My "after changing the text" strongly suggested a key board change. The steep learning curve threw me off for a moment! byman2030 Next time! I just didn't realize there was difference to be made I wasn't No problem. I was pressing I realzied I had left fter
Quote: > That's absolutely correct. > I would have suggested it, but I assumed your comment about "after changing > the > text" meant you had keyed additional text in. > -- > Doug Steele, Microsoft Access MVP > http://I.Am/DougSteele > (no private e-mails, please)
> > OK, I just discovered what may be the problem. > > Before, I had been entering all my changes by clicking or tabbing into the > > textbox and then setting the date with alt+arrow keys that > > programmatically > > changed the date up or down in the textbox control. > > When I would test for the AfterUpdateEvent it didn't launch. > > However, I just happened to use the number keys this time to change the > > date, and the "hello" message appeared when I tabbed out . > > So, it would seem, the AfterUpdateEvent doesn't launch for changes made > > programmatically, only for changes made directly by the keyboard. > > byman2030
> >> I just created a new auto form for test purposes and the AfterUpdate > >> event > >> works there Ok. > >> Its just not working on the form I developed in design view.
> >> > If you click on the ellipsis (...) to the right of the [Event > > Procedure], > >> > does it take you to your routine? If not, perhaps you misspelled the > > name > >> of > >> > the control in your code (txtFileArriveDate) > >> > -- > >> > Doug Steele, Microsoft Access MVP > >> > http://I.Am/DougSteele > >> > (no private e-mails, please)
> >> > >I placed Msgbox "hello" within the white space of the procedure but > >> > >I > >> > >have > >> > > done nothing else that might be called linking. > >> > > Private Sub txtFileArriveDate_AfterUpdate() > >> > > MsgBox "hello" > >> > > End Sub > >> > > The property sheet says [Event Procedure] next to the > >> > > AfterUpdateEvent > >> for > >> > > the textbox control. > >> > > I am using Access2000 in case that makes a difference
> >> > > message
> >> > >> Did you link your routine to the event for the text box? (The > >> > >> linkage > >> > >> doesn't usually happen automatically). Go to the properties to the > > text > >> > > box > >> > >> and look at whether there's anything beside the AfterUpdate event. > >> > >> -- > >> > >> Doug Steele, Microsoft Access MVP > >> > >> http://I.Am/DougSteele > >> > >> (no private e-mails, please)
> >> > >> >I experimentally placed some msgbox code in the AfterUpdate event > > for > >> a > >> > >> > bound textbox control but it doesn't seem to launch. > >> > >> > Private Sub txtFileArriveDate_AfterUpdate() > >> > >> > MsgBox "hello" > >> > >> > End Sub > >> > >> > I tried moving to another control on the form (after changing the > >> text) > >> > >> > but > >> > >> > it doesn't launch then (no msgbox prompt). > >> > >> > Nor does it launch when I change to a different record. > >> > >> > How and when does this event trigger? Is there, maybe, a property > >> > > setting > >> > >> > somewhere to set to activate it? > >> > >> > By the way, the table underlying the control gets updated OK and > >> > >> > I > >> can > >> > >> > run > >> > >> > the "form's" AfterUpdate event fine. > >> > >> > Thanks, > >> > >> > byman2030
|
Thu, 06 Nov 2008 04:29:43 GMT |
|
 |
Ron200 #10 / 10
|
 AfterUpdate For TextBox Not Launching?
basically, if you programmatically, or even using cut and past, to change the value of a field, then the code that you would have executed in the afterupdate needs to be done at the programmatic point. I frequently use dblclick to call a calander - If I want a date test in the afterupdate, I also have to include it in the dblclick event after the call to the calander.
|
Sat, 08 Nov 2008 01:01:13 GMT |
|
|
|