Rabu, 25 Januari 2012

[MS_AccessPros] Combo Box used for parameter query, form, and report

 

I created a custom dialog box (Vendor Dialog Box) that has a combo box and I have a query that will be the recordsource of this combo box. I've also created a report based on this query. What I want is when the report is opened it will open the Vendor Dialog Box and allow the user to select a vendor from the drop down menu, and based on that selection the report will be displayed. I have added my capital project invoice log into the AssistantNeeded folder.

I'm receiving a compile error: sub or function not defined. The following is the code I'm using and I'm getting the error on the IsLoaded portion of the code:

Option Compare Database

Private Sub Report_Close()
DoCmd.Close acForm, "Vendor Dialog Box"
End Sub

Private Sub Report_Open(Cancel As Integer)
' Set public variable to true to indicate that the report
' is in the Open event
bInReportOpenEvent = True

' Open Vendor Dialog Box
DoCmd.OpenForm "Vendor Dialog Box", , , , , acDialog

' Cancel Report if User Clicked the Cancel Button
If IsLoaded("Vendor Dialog Box") = False Then Cancel = True

' Set public variable to false to indicate that the
' Open event is completed
bInReportOpenEvent = False
End Sub

Any help is appreciated!!

Thanks!

Katrina

__._,_.___
.

__,_._,___

Tidak ada komentar:

Posting Komentar