PC Review


Reply
Thread Tools Rate Thread

Combo box display

 
 
danc09
Guest
Posts: n/a
 
      14th Jan 2008
Using A2K, I have 2 combo boxes on a continuous form, cboCompany and
cboDescription. After I make a selection in cboCompany, I would like to have
only descriptions from cboCompany display for selection in cboDescription.
In a query, I looked for descriptions from the form and cboCompany. This
works for the first occurrence of the continuous form, but the same
descriptions are displayed for each additional line even if a new company has
been selected on cboCompany.
How can I get this to work?
Thank,
Dan

 
Reply With Quote
 
 
 
 
DeltaTech
Guest
Posts: n/a
 
      14th Jan 2008
Hi danc09

After each selection of cboCompany you need to requery cboDecsription


In the properties box of cboDescription open the select query and enter the
criteria :-

Forms!FormName.cboCompany

In the properties box of cboCompany
select "After Update" then select "Event Proceedure"

For the "Event Proceedure code enter the following command

Me.cboDescription.requery

Have fun

DeltaTech



"danc09" <(E-Mail Removed)> wrote in message
news:E0A48C51-FDAF-4BAC-980E-(E-Mail Removed)...
> Using A2K, I have 2 combo boxes on a continuous form, cboCompany and
> cboDescription. After I make a selection in cboCompany, I would like to
> have
> only descriptions from cboCompany display for selection in cboDescription.
> In a query, I looked for descriptions from the form and cboCompany. This
> works for the first occurrence of the continuous form, but the same
> descriptions are displayed for each additional line even if a new company
> has
> been selected on cboCompany.
> How can I get this to work?
> Thank,
> Dan
>



 
Reply With Quote
 
Yanick
Guest
Posts: n/a
 
      14th Jan 2008
In the "after update" event of cboCompany change the "row source" of
cboDescription to match the value in cboCompany.

should look like :
me.cboDescription.rowSource = "Select [YourTableName].Description FROM
[YourTableName] WHERE [YourTableName].CompanyName = '" & me.cboCompany.Value
& "'"

Should do the tirck!

--
Yanick


"danc09" wrote:

> Using A2K, I have 2 combo boxes on a continuous form, cboCompany and
> cboDescription. After I make a selection in cboCompany, I would like to have
> only descriptions from cboCompany display for selection in cboDescription.
> In a query, I looked for descriptions from the form and cboCompany. This
> works for the first occurrence of the continuous form, but the same
> descriptions are displayed for each additional line even if a new company has
> been selected on cboCompany.
> How can I get this to work?
> Thank,
> Dan
>

 
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
Combo Box Does Not Display Value Amy E. Baggott Microsoft Access Forms 3 16th Mar 2009 07:53 PM
Using Combo Boxes to Display Data from Previous Combo Box select? =?Utf-8?B?SmV0aDA4MDg=?= Microsoft Access 1 12th Jun 2006 04:44 PM
Combo box display montbrae Microsoft Access Form Coding 2 26th Nov 2005 06:57 PM
Re: Dynamically display combo box based on selection in another combo Wayne Morgan Microsoft Access Forms 2 27th Aug 2004 08:43 PM
using selection in combo box to filter another combo box display =?Utf-8?B?TVJS?= Microsoft Access Form Coding 1 8th Feb 2004 11:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:44 PM.