PC Review


Reply
Thread Tools Rate Thread

Cascading Combo Box & Content Filtering

 
 
Joe Jacobs
Guest
Posts: n/a
 
      21st Jan 2008
I have a multi-sheet workbook in which I would like to autofill key cells.
Sheet 1 contains spec records that can be tagged for complexity: high,
medium, low. Sheet 2 contains the autofill cells.

My problem: I wish to use two combo boxes to filter the spec records by tag.
Combo Box 1 allows the user to select the appropriate complexity level.
Based on this selection, Combo Box 2 should populate with the filtered
records. Selecting a record in Combo Box 2, finally, should populate the
autofill cells with the appropriate information.

I attempted to use Tom Oglivy's code on "Filtered list for Combo Box
ListFillRange" response to populate Combo Box 2. It is not working and, as a
VBA newbie, I need additional assistance.
 
Reply With Quote
 
 
 
 
Joe Jacobs
Guest
Posts: n/a
 
      23rd Jan 2008
I am including the code I have at present (below). I am having trouble with
the AddItem property. It appears that I cannot add an item from another
defined range. Any help would be appreciated.

Private Sub ComboBox1_Click()

Dim cRange As Range
Set cRange = Me.Range("RNG1")
Dim sRange As Range
Set sRange = Me.Range("LS1")
Dim x As Integer 'For Row
x = 10

Me.ComboBox2.Clear

For Each sRange In Range(cRange).Columns(1).Cells
If cRange.Value = Me.ComboBox1.Value Then
For x = 10 To 19
ComboBox2.AddItem sRange.Cells(x, 34)
ComboBox2.List(ComboBox2.ListCount - 1, 1) = cRange.Offset(0, 1)
Next x
End If
Next
End Sub

"Joe Jacobs" wrote:

> I have a multi-sheet workbook in which I would like to autofill key cells.
> Sheet 1 contains spec records that can be tagged for complexity: high,
> medium, low. Sheet 2 contains the autofill cells.
>
> My problem: I wish to use two combo boxes to filter the spec records by tag.
> Combo Box 1 allows the user to select the appropriate complexity level.
> Based on this selection, Combo Box 2 should populate with the filtered
> records. Selecting a record in Combo Box 2, finally, should populate the
> autofill cells with the appropriate information.
>
> I attempted to use Tom Oglivy's code on "Filtered list for Combo Box
> ListFillRange" response to populate Combo Box 2. It is not working and, as a
> VBA newbie, I need additional assistance.

 
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
Cascading Combo Box - 2nd combo box changing 1st in previous recor Sarah Microsoft Access Forms 1 23rd Nov 2009 05:37 AM
Cascading CboBox Filtering DubboPete Microsoft Access Form Coding 3 8th Nov 2005 08:31 AM
Filtering with Cascading Combo Boxes =?Utf-8?B?TWFyZ3Vlcml0ZSBIYWxs?= Microsoft Access Forms 2 27th Oct 2004 02:57 PM
Filtering with cascading combo boxes =?Utf-8?B?TWFyZ3Vlcml0ZSBIYWxs?= Microsoft Access Getting Started 0 21st Oct 2004 05:23 PM
Cascading filtering with DataView Webgour Microsoft C# .NET 1 30th Jul 2004 08:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:25 AM.