Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with combo boxes

Status
Not open for further replies.

Keetso

Technical User
Nov 18, 2003
49
CA
Hi.

After reading the FAQs and the posts here referring to limiting the values of one combo box based on the value selected in a different combo box, I've tried to set one up myself but am having a problem.

Here's what I'm trying to do:

Enter an Insurance Broker's information (name, address, etc). Along with the above info, I have to fill in a "manager's" Last and first name for that Broker. I've created two combo boxes for the manager's LN and FN that uses a table (tblNewBusMgrInfo) that's populated with the manager's information (LN, FN, address, etc).

Here's the environment:

Combo box 1 (Broker's LN)
name: Combo74
RowSourceType: table/query
RowSource: SELECT [tblNewBusMgrInfo].[NewBusMgrLN] FROM tblNewBusMgrInfo;
AfterUpate: Combo76.requery (EVENT)

Combo box 2 (Broker's FN)
name: Combo76
RowSourceType: table/query
RowSource: SELECT [tblNewBusMgrInfo].[NewBusMgrFN] FROM tblNewBusMgrInfo WHERE [tblNewBusMgrInfo].[NewBusMgrLN]=Forms![frmlBrokerInformation]![Combo74].BrkrNewBusMgrLN;
The Problem:

I can choose the last name (combo box 1) and populate the field. After choosing the last name, I tab to the first name (combo box 2) field and click on the "down" arrow. I then get a parameter box pop up asking for the value of, "Forms![frmlBrokerInformation].......". I know there's probably a glaring syntax problem, etc, but I can't seem to see it. I know all my field name/form name spelling is correct.

Could anyone shed some light on this for me?

Many TIAs!

K
 
You have to use run-time not compile-time values. Thus a run-time query might look like this for a number:

"WHERE [MyField] = " & me![MyField]

and

"WHERE [MyField] = '" & me![MyField] & "'"

for a text value.

Can you see the diff? [MyField] does not = me![MyField], it equals the value in me![MyField]


rollie@bwsys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top