Help with columns/look-up fields

S

sendahook

Hello,

I have a lookup table which is bound to a field called [STREET] which
allows the user to pick any street in our city from a combo box. I
also placed a second field/column for every street name that indicates
which zone it is in. (Smith Rd. is zone 4, 4th Ave is zone 7 and so
on)

The first field with the street name is the bound field which gets
stored. I would like to have the zone showed on the form when the
street is entered so I tried to create a textbox that was bound to the
[STREET] field and chose to bind the zone column (column 2) to that
textbox but it did not work. I know this can be done but not sure
how?

Any suggestions would be appreciated
 
A

Allan Murphy

Try this

Using the afterupdate event of your combo box try

me!textbox_zone = me!combobox_street.column(1)

textbox_zone is textbox to hold the zone value

combobox_street is the name of your the comb box used for street.

Queries columns count from 0 to whatever. In your query you have two
columns, and these are referred to column(0) and column(1)
 
Top