Since I have been re-writing my database to use tabbed controls rather than the navigation forms I have run into several issues.
One of which is running my reports from the form in my tabbed control
I worked with my form (frm_reportcenter) and put an unbound combobox (cboFacility) to choose a facility and a command button (cmdWaitingOnVis) to open a report (rep_waitingonvis) and it opens filtered to only the facility I choose in the combobox and a status of "Waiting on Visual Inspection".
It works great... standalone... however when I try to do it from the page (ReportCenterForm) in my tabbed control (TabCtl87) it asks for the parameter "Forms!frm_reportcenter!cboFacility".
Here is the query (qry_facilities) for the combobox on the form frm_reportcenter (cboFacility)(bound column 3):
Here is the report query (qry_waitvis):
Here is the code behind the command button on the frm_reportcenter (cmdWaitingOnVis):
The page name it is on is: ReportCenterForm
The tabbed control is named: TabCtl87
I am missing something in the WHERE clause to make this work from the tab i'm sure... please help!
One of which is running my reports from the form in my tabbed control
I worked with my form (frm_reportcenter) and put an unbound combobox (cboFacility) to choose a facility and a command button (cmdWaitingOnVis) to open a report (rep_waitingonvis) and it opens filtered to only the facility I choose in the combobox and a status of "Waiting on Visual Inspection".
It works great... standalone... however when I try to do it from the page (ReportCenterForm) in my tabbed control (TabCtl87) it asks for the parameter "Forms!frm_reportcenter!cboFacility".
Here is the query (qry_facilities) for the combobox on the form frm_reportcenter (cboFacility)(bound column 3):
Code:
SELECT DISTINCT tbl_facilities.ID, tbl_facilities.FacilityNumber, tbl_facilities.FacilityName
FROM tbl_facilities
ORDER BY tbl_facilities.FacilityName;
Here is the report query (qry_waitvis):
Code:
SELECT tbl_auditdata.AuditID, tbl_auditdata.Status, tbl_auditdata.Facility, tbl_auditdata.PONumber, tbl_auditdata.PartNumber, tbl_auditdata.TotalReceived, tbl_auditdata.RecDate, tbl_auditdata.PartProdDate, TotalReceived/10 AS TenPercent, tbl_auditdata.RecEntryDate
FROM tbl_auditdata
WHERE (((tbl_auditdata.Status)="Waiting on Visual Inspection") AND ((tbl_auditdata.Facility)=[Forms]![frm_reportcenter]![cboFacility]))
ORDER BY tbl_auditdata.RecDate;
Here is the code behind the command button on the frm_reportcenter (cmdWaitingOnVis):
Code:
Private Sub cmdWaitingOnVis_Click()
DoCmd.OpenReport "rep_waitingonvis", acViewPreview
End Sub
The page name it is on is: ReportCenterForm
The tabbed control is named: TabCtl87
I am missing something in the WHERE clause to make this work from the tab i'm sure... please help!
Last edited: