Fill in a form control based on another control

rap1971

Registered User.
Local time
Today, 22:06
Joined
Jan 16, 2001
Messages
23
I want to automatically fill in a text box on my form based on the selection in the previous list box. I know how to do this in Oracle...love those post-text triggers...but can't seem to get it right in Access.
i.e. I have a Sales_Reps table with Rep_ID, Rep_name and Rep_phone (among others) fields. The list box pulls the Rep_ID (which is hidden) and the Rep_name. Once a Rep_name is selected, I want the phone text box on the form to automatically fill in with the reps phone number.

Please help!

**Wherever you go, there you are**
 
Bravo!
It works...thank you so much! I had been beating my head against a wall for days! (I'm not real good with VB...so this really made my day!)

Thank you, thank you, thank you.
 
P.S.
What does the Me stand for/do in that line of code?
 
the Me. references the Current Form.

Instead of typing
Forms![CurrentForm]![ControlName]

you type

Me.[ControlName]

Duane Barker
 

Users who are viewing this thread

Back
Top Bottom