autofilling fields (1 Viewer)

Markatthepub

New member
Local time
Today, 20:44
Joined
Jan 8, 2003
Messages
8
Help please,

If I select a supplier in a field, the next field allows me to select an engineer attached to that supplier. If i select the engineer from the list how do i get his/hers telephone number to automatically display in the next field.

thanks and thanks again

Mark
 

shay

Registered User.
Local time
Today, 20:44
Joined
Apr 29, 2002
Messages
169
Hi there

I assume the Engineer's name is being selected from a combo box. I would include the telephone number as a hidden column in the combo box (ie make the column width = 0). Then in the combo box's AfterUpdate event, put the following line:

txtTelephoneNo = Me.cmbEngineer.column(1)

You'll need to change the control names and the code assumes the telephone number is in the 2nd column of the combo box.

hth

shay :cool:
 

Markatthepub

New member
Local time
Today, 20:44
Joined
Jan 8, 2003
Messages
8
Shay,

Thanks for your help, it is indeed a combo box. I'll incorporate the change and see how I get on

thanks again

Mark
 

shay

Registered User.
Local time
Today, 20:44
Joined
Apr 29, 2002
Messages
169
Hi

Here's an even simpler solution. Put

= Me.cmbEngineer.column(1)

in the controlsource of the text box which you want to display the phone number.

shay :cool:
 

Users who are viewing this thread

Top Bottom