Filtering a combo box based on another combo box selection

Melimolo

New member
Local time
Today, 13:40
Joined
May 13, 2009
Messages
7
I give up! I've tried these two methods from Microsoft and I can't get them to work.

http://support.microsoft.com/default.aspx?scid=kb;en-us;209576
(Both queries were built successfully, but I can't connect the main one to my form. Instead, a window opens asking me for my primary value.)

http://support.microsoft.com/kb/289670
(This is just way too confusing, but I tried!)

I have Access 2003.

My form is called frmTestResults

My combo box1 is cboMCCSelect
My combo box2 is cboSPOCSelect

I have a table called tblMCC and another called tblSPOC

tblMCC has the following fields:
MCC ID (Primary key)
MCC Name
Location

tblSPOC has fields
spoc_id (primary key)
spoc_name
associated_mcc (foreign key, linked to MCC Name from previous table)

The selections go in my tblTestResults table.

I don't know what else I can tell you. If someone can help, it would be awesome!

Meli
 
I'm not sure I follow what the problem is but basically you just use the value in the first combo box as a filter for the row source query for the second combo box and everytime you change or select a value in the first combo box you requery the second one.
 
I don't know what I'm doing wrong, but I can't get either method to work. I have no clue how to use VBA. It keeps asking me to create an Event Procedure, but their examples are with Categories and Products... I need MCC and SPOC to talk to each other. I don't know if they refer to a field name in the coding or if it's a table name. I would easily substitute everwhere it says Category for MCC and Products for SPOC, but it doesn't work like that! :(
 
Give me a minute to whip up a sample db...

Edit: Here you go, see if this helps
 

Attachments

Last edited:
I think I'm doing more harm than good in my database. I can't get my values to fit in. Should I just send someone my database to have a look at it? I think I majorly screwed up the VBA coding too! :eek:
 
I started from scratch and I copied the sample database from Microsoft. It worked! Yay... now on to a different project! Thanks Ken for trying to help me.

Mel
 

Users who are viewing this thread

Back
Top Bottom