Help with columns/look-up fields

S

sendahook

I tried the suggestion you gave and it gave me a message saying
something to the effect of:

"Microsoft Access can't find the macro 'me!textbox_zone =
me!combobox_street.' The macro hasn't been created or a new macro
hasn't been saved"

Do I need to create a macro to use the afterupdate event?

Allan said:
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)

--
Allan Murphy
Email: [email protected]

"sendahook" [email protected] wrote in
message

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
 
O

Ofer

The afterupdate event property of the field where you enter that code, in the
that property select code, and then enter that code.
Dont put the "'me!textbox_zone =me!combobox_street." strait in the line
because it will look for a macro with that name.


sendahook said:
I tried the suggestion you gave and it gave me a message saying
something to the effect of:

"Microsoft Access can't find the macro 'me!textbox_zone =
me!combobox_street.' The macro hasn't been created or a new macro
hasn't been saved"

Do I need to create a macro to use the afterupdate event?

Allan said:
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)

--
Allan Murphy
Email: [email protected]

"sendahook" [email protected] wrote in
message

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
 
Top