Connecting Tech Pros Worldwide Help | Site Map

Auto populate a second field

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 01:32 AM
John
Guest
 
Posts: n/a
Default Auto populate a second field

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, 01:32 AM
asdfg2k
Guest
 
Posts: n/a
Default 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


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.