By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,967 Members | 1,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,967 IT Pros & Developers. It's quick & easy.

How to have other fields on form autofilled after I choose a value from list box

P: n/a
I have two tables, one consists of company info like name and phone
number.
Another table where I have to fill in the contact persons. Part of the
form is to choose the company he works for (From a list box). Then,
after I choosed the conpany, I want to have auto filled in the field
phone number from the 1st table. But, and that's why i want to have it
archieved in the table (so no redundancy): I want that the field
phonenumber can be editted as the company phone number is not always
the direct number from the contact person.

Bart
v 2003

Feb 25 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"AA Arens" <ba***********@gmail.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
I have two tables, one consists of company info like name and phone
number.
Another table where I have to fill in the contact persons. Part of the
form is to choose the company he works for (From a list box). Then,
after I choosed the conpany, I want to have auto filled in the field
phone number from the 1st table. But, and that's why i want to have it
archieved in the table (so no redundancy): I want that the field
phonenumber can be editted as the company phone number is not always
the direct number from the contact person.


A common method...

Use a ComboBox for entering the Company and include a hidden column that has the
phone number. In the AfterUpdate event of the ComboBox have code...

Me.ContactPhone = Me.Company.Column(n)

....where 'n' is the zero based position of the hidden phone number column in the
ComboBox.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Feb 25 '06 #2

P: n/a
I am halfway in the given procedure. How about the setting in the
ContactPhone field.
Must it be like

Me.ContactPhone = Len(me!ContactPhone)

in GotFocus or BeforeUpdate?

Bart

Mar 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.