Combo boxes Access 2003

  • Thread starter Thread starter Roger
  • Start date Start date
R

Roger

I am trying to create a 2 column combo box for suburbs &
respective postcodes. I need it to entre the postcode
when the suburb is selected. I have tried but when I
selct the suburb, the post code does not come into the
form. I have been using the Wizard, abd am obviously
doing something wrong.

Any help appreciated
 
Let's say your combo, called cboMyCombo, has 2 columns:

Suburb
Postcode

The bound column is column zero(0), the first one, Suburb, and that is also
the displayed column. Let's also assume that you have a textbox named
txtPostCode. An [Event Procedure] in your combo's AfterUpdate event would
look like this:

Sub cboMyCombo_AfterUpdate()
Me.txtPostCode = Me.cboMyCombo.Column(1)
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top