PC Review


Reply
Thread Tools Rate Thread

auto populate text box based on combo box value

 
 
Yappy
Guest
Posts: n/a
 
      27th May 2010
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
 
Reply With Quote
 
 
 
 
Daryl S
Guest
Posts: n/a
 
      27th May 2010
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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Populate text box based on combo box =?Utf-8?B?RW1pbHk=?= Microsoft Access 7 2 Weeks Ago 01:47 PM
RE: auto populate text box based on combo box value Yappy Microsoft Access Forms 0 27th May 2010 08:53 PM
Re: Auto Populate a Combo Box based on the user selection of another Combo Box John W. Vinson Microsoft Access Forms 0 2nd Mar 2010 04:56 AM
Auto-populate fields in form based on combo box selection =?Utf-8?B?TWFyayBCcmFkeQ==?= Microsoft Access Form Coding 2 16th Mar 2006 09:01 PM
How do I populate a text box based on a combo box? =?Utf-8?B?SmFzb24gQg==?= Microsoft Access Forms 5 1st Nov 2005 12:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:00 AM.