Combo box event not firing

wgma

Registered User.
Local time
Today, 13:15
Joined
Nov 19, 2007
Messages
72
I have a combo box that has code behind the AfterUpdate event. When I run the form nothing happens.

What am I doing wrong?

Thanks.
 
What you're currently doing wrong is posting a question like this without posting the code you're using! We don't have your database in front of us!
 
I have put a break point in the code and it never reaches it. That is why I did not put the code in.

Private Sub cboConsignee_AfterUpdate()
Me.txtConsigneeAddress.Value = Me.cboConsignee.Column(2)
End Sub
 
A few things:

Are there at least 3 fields in the combobox, and is the 3rd field the one holding the address?

Also, what version/service pack of Access are you running?

You sound as if you don't think the AfterUpdate event is firing. A good technique to check this out would be to place a message box in the event and see if it fires.

In Design View, when you select the combobox and go to

Properties - Event, beside the AfterUpdate Property, do the words [Event Procedure] appear?
 
Sorry, I am using 2007, windows XP Pro.

I put a msgbox in the code and it did not execute. Yes, the address is the third column. I do see the [Event Procedure] next to the AfterUpdate.

Thanks for your response. I am not finding anything on this.
 
Aha! In v2007, code VBA won't work unless you've declared the folder that the database resides in as "trusted!"

To trust your folder, click:
* Office Button (top left)
* Access Options (bottom of dialog)
* Trust Center (left)
* Trust Center Settings (button)
* Trusted Locations (left)
* Add new location (button)

THis advice is straight from the "Wonder from Down Under, Allen Browne!"
 

Users who are viewing this thread

Back
Top Bottom