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

Subform Question

Status
Not open for further replies.

Ray1127

Programmer
Feb 22, 2002
231
US
I have a Mainform and a subform in an Access 2000 Database. There are 2 combo boxes on the subform 1 for type and 1 for subtype. Each Type can have 1 to 3 subtypes. If I open the subform by itself everything works fine. If I change the Type the correct subtypes are available. If I open the main form and enter data into the subform the subtype combo box prompts for the parameter in the query that points to the type combobox.

Now to my question. I've set the criteria in the query where the field is = Forms!frm_Audits!cbo_Type. Since frm_Audits is a subform is this the correct syntax to retrieve the Data for this query??? The Query is as follows: "SELECT [tbl_Audit_Subtypes].[Subtypeid], [tbl_Audit_Subtypes].[typeid], [tbl_Audit_Subtypes].[desc] FROM tbl_Audit_Subtypes WHERE ((([tbl_Audit_Subtypes].[typeid])=[forms]![frm_Audits]![cbo_Audit_Type]));

 
[tbl_Audit_Subtypes].[typeid])=
[forms]![frm_Audits].form!frm_subformname.form![cbo_Audit_Type]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top