AfterUpdate For TextBox Not Launching?

B

byman2030

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
 
D

Douglas J. Steele

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.
 
B

byman2030

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
 
D

Douglas J. Steele

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

(no private e-mails, please)


byman2030 said:
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

Douglas J. Steele said:
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.
 
B

byman2030

Yes, clicking on the ellipsis dots takes me to the routine.

Douglas J. Steele said:
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

(no private e-mails, please)


byman2030 said:
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

Douglas J. Steele said:
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

(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
 
B

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.

Douglas J. Steele said:
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

(no private e-mails, please)


byman2030 said:
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

Douglas J. Steele said:
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

(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
 
B

byman2030

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

byman2030 said:
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.

Douglas J. Steele said:
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

(no private e-mails, please)


byman2030 said:
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

(no private e-mails, please)


I experimentally placed some msgbox code in the AfterUpdate event
for
 
D

Douglas J. Steele

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

(no private e-mails, please)


byman2030 said:
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

byman2030 said:
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.

Douglas J. Steele said:
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

(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

(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
 
B

byman2030

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
Douglas J. Steele said:
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

(no private e-mails, please)


byman2030 said:
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

byman2030 said:
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

(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

(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
 
R

Ron2006

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top