Connecting Tech Pros Worldwide Help | Site Map

Auto populate a second field

  #1  
Old November 13th, 2005, 02:32 AM
John
Guest
 
Posts: n/a
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-
  #2  
Old November 13th, 2005, 02:32 AM
asdfg2k
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-populate form based on list box selection on a second form kickergirl answers 1 May 31st, 2008 06:37 AM
Auto populate a field based on selection from Combo box whamo answers 4 October 12th, 2007 03:13 PM
Auto populate combo box range based upon previous selection joseph.mccastlain@gmail.com answers 3 March 26th, 2007 08:45 PM
Auto fill trouble Jim answers 1 November 30th, 2006 09:35 AM