View Single Post
  #2  
Old May 27th, 2010, 10:24 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default auto populate text box based on combo box value

Yappy -

You need to use the AfterUpdate event of the combo box to populate the other
fields. For the combo box, Column(0) is the first column, so adjust as
needed. The code will look something like this, one line for each unbound
text box (use your control names):

Me.[Region Number] = Me.LURequestor.Column(5)
Me.[Region] = Me.LuRequestor.Column(6)


--
Daryl S


"Yappy" wrote:

I would like to set up the following to auto populate the fields below based
on the value I select in the combo box:
Rep field = combo box (LURequestor) with all info included pertaining to the
rep
The combo box row/source type is Table/Query; row source is SELECT
qryReps.FullName, qryReps.[Last Name], qryReps.[First Name],
qryReps.RegionNumber, qryReps.Region, qryReps.Division,
qryReps.[RSM-Director] FROM qryReps ORDER BY qryReps.FullName; & RepID is
hidden

Region Number = unbound text box (Column 4)
Region = unbound text box (Column 5)
Manager = unbound text box (Column 7)
Division = unbound text box (Column 6)

I have tried setting up the text boxes with =[LURequestor].[Column](4) in
each unbound text box with the respective column number but the form shows
"#Name?" in the field.

I am using Access 2003. What could I be doing wrong? Any help would be
appreciated.

Yappy