Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AfterUpdate event is not firing

Status
Not open for further replies.

wgma

IS-IT--Management
Nov 16, 2007
24
US
I have a simple form that I have added combo box to. I added some code to the AfterUpdate event that would put one of the values from the combo box into a textbox. However, the event never fires.

I tried On_Change but that does not work either.

Here is my code:

Option Compare Database

Private Sub cboConsignee_AfterUpdate()
msgbox("Test",vbDefaultButton1)
Me.txtConsigneeAddress.Value = Me.cboConsignee.Column(2)
End Sub

What is wrong here? I don't think that there is a problem with the code but there must be a setting somewhere that I need to change.

I am using Access 2007 on Windows XP Pro

Thanks.
 
double check in the properties tab under events
afterUpdate = [Event Procedure]
If you did a copy and paste this will not be in the properties.
 
It is there. I created the event from the properties page.
 
Is the value changed manually or by code? If it is done by code, then no event takes place. If not
1)compile the vba code
2)do a compact and repair
if no luck
3)Delete the old control and rebuild it
 
I had to compile it. As you can tell I don't use Access much.

Thanks.
 
FYI. You should not have to compile the code and the events should still fire, but that seems to be a fix.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top