Connecting Tech Pros Worldwide Help | Site Map

Auto populate a second field

John
Guest
 
Posts: n/a
#1: Nov 13 '05
I have two fields on a form. Once called School, the second called
SchoolZip
I want the users to be able to go to the ComboBox field called School,
select the school they want, and have it auto populate the SchoolZip
field too.

Combobox name = School
Row Source Type = Table / Query
Row Source = SELECT tSchools.School, tSchools.ZipCode FROM tSchools;
Bound Column = 1
Limit to List = Yes

and of course I have the table tSchools which is list of school names
and the associated zip code.
tSchools.School
tSchools.ZipCode

So... on the form, you go to the combo box schools and select
'Standard School' and it populates the School field AND ALSO populates
the SchoolZip field with 93301 (the zipcode for Standard school).

Sounds pretty simple.... just can't find the obvious.

Thanks for your time,
john-
asdfg2k
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Auto populate a second field


On 2 Aug 2004 13:28:45 -0700, jomonto@zeus.kern.org (John) wrote:
[color=blue]
>I have two fields on a form.[/color]

No, you don't. You have two "controls".
[color=blue]
>Once called School, the second called
>SchoolZip
>I want the users to be able to go to the ComboBox field called School,
>select the school they want, and have it auto populate the SchoolZip
>field too.
>
>Combobox name = School
>Row Source Type = Table / Query
>Row Source = SELECT tSchools.School, tSchools.ZipCode FROM tSchools;
>Bound Column = 1
>Limit to List = Yes
>
>and of course I have the table tSchools which is list of school names
>and the associated zip code.
>tSchools.School
>tSchools.ZipCode
>
>So... on the form, you go to the combo box schools and select
>'Standard School' and it populates the School field AND ALSO populates
>the SchoolZip field with 93301 (the zipcode for Standard school).
>
>Sounds pretty simple.... just can't find the obvious.[/color]

Sounds like a homework assignment.

Look up the column() property and AfterUpdate event of comboboxes.

That should get you where you need to go.

john


Closed Thread