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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

second combo box based on the selected of the first combo box 1

Status
Not open for further replies.
Feb 4, 2009
137
US
Hello,
I have 2 combo boxes named "Divisions" and "Sections". Second combo box is based on the selected of the first combo box. It's is working fine when I open the form itself. However, when I put this form on another form use subform on the second tab. When click on this tab, I got an error pop up with "Enter parameter value: [Forms]![_frm_Volunteer_TimeTracking_sfrm]![Divisions]" . Please help.

Second combox:
Row Source =
SELECT tblSections.SectionCode, tblSections.SectionName FROM tblSections WHERE (((tblSections.DivisionCode)=[Forms]![_frm_Volunteer_TimeTracking_sfrm]![Divisions])) ORDER BY tblSections.ID;
 
You need to understand how to reference controls on subforms. The Main form must be included followed by the name of the subform control name which is often the same as the source document.
[tt]
[Forms]![MainFormName]![_frm_Volunteer_TimeTracking_sfrm].Form.[Divisions]
[/tt]

Duane
Hook'D on Access
MS Access MVP
 
Thanks dhookom, it worked
[Forms]![MainFormName]![_frm_Volunteer_TimeTracking_sfrm]![Divisions]
I'm very appreciated.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top