Just can't get it to work

S

SVE

Hi all,

I am sorry to be asking this, but I have tried various solutions from this
site and other sources, and can't get my cascades to work. I'm fairly new to
VBA and SQL so I'm probably just writing the code incorrectly. Here's the
data for the form and the relevent controls.

Form: Call Log

Combo box1: LotNumber (has columns: ID, LotNumber, SubdivisionName,
Homeowner; all from a table 'Lots')

Combo box2: ContactID (has columns: SubContactID, Expr1, CompanyName; from
table 'Subcontractor Contacts'; also, when I choose a name from this box, it
populates another text box on the form called 'CompanyName')

Combo box3: IssueID (has columns: LotsID, SubcontractorContact,
WorkToBePerformed, Status; from table 'Issues'; also has columns: LotNumber
from table 'Lots' and column CompanyName from table 'Subcontractor Contacts';
Status column has criteria: <>"Closed" Or <>"Resolved")

What I want to do is choose a LotNumber in Combo box1 (which will narrow the
list in combo box 3), then choose a contact in combo box2; when the combo box
2 choice populates the CompanyName text box, that data (Company Name) should
filter combo box 3 even further.

Can someone please help me out here? I appreciate any and all help. Thanks
in advance.
 
S

Steven M. Britton

You need to use the Criteria in the Row Source of the Combo Box. On combo
box #2 go into the properties and go to the tab data, then select the ...
next to row source. This will open the window that looks just like a query
builder. Now in the Critera section under the lot number I assume put
[forms]![Call Log]![ExcatNameofComboBox]).

Now this will filter your second combo box based on the bound column of the
1st combo box, therefore you must have the table related and the
relationships established for this to work.
 
S

SVE

Thanks for the information. I have tried that numerous times, and it
wouldn't work. But it worked this time. Thanks again.

Steven M. Britton said:
You need to use the Criteria in the Row Source of the Combo Box. On combo
box #2 go into the properties and go to the tab data, then select the ...
next to row source. This will open the window that looks just like a query
builder. Now in the Critera section under the lot number I assume put
[forms]![Call Log]![ExcatNameofComboBox]).

Now this will filter your second combo box based on the bound column of the
1st combo box, therefore you must have the table related and the
relationships established for this to work.


SVE said:
Hi all,

I am sorry to be asking this, but I have tried various solutions from this
site and other sources, and can't get my cascades to work. I'm fairly new to
VBA and SQL so I'm probably just writing the code incorrectly. Here's the
data for the form and the relevent controls.

Form: Call Log

Combo box1: LotNumber (has columns: ID, LotNumber, SubdivisionName,
Homeowner; all from a table 'Lots')

Combo box2: ContactID (has columns: SubContactID, Expr1, CompanyName; from
table 'Subcontractor Contacts'; also, when I choose a name from this box, it
populates another text box on the form called 'CompanyName')

Combo box3: IssueID (has columns: LotsID, SubcontractorContact,
WorkToBePerformed, Status; from table 'Issues'; also has columns: LotNumber
from table 'Lots' and column CompanyName from table 'Subcontractor Contacts';
Status column has criteria: <>"Closed" Or <>"Resolved")

What I want to do is choose a LotNumber in Combo box1 (which will narrow the
list in combo box 3), then choose a contact in combo box2; when the combo box
2 choice populates the CompanyName text box, that data (Company Name) should
filter combo box 3 even further.

Can someone please help me out here? I appreciate any and all help. Thanks
in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top