Hi Duane,
I did as you instructed, and the report opens now without asking to enter a parameter value; however, it does not display the data in the report. Did I miss a step? Below is the code I'm using:
Private Sub Command93_Click()
Dim strReport As String
Select Case Me.RptOpt
Case Is = 1
strReport = "R_TrainingHistConfig"
DoCmd.RunMacro "TrainingHistConfig"
Case Is = 2
strReport = "R_TrnTrxnClassRoster"
DoCmd.RunMacro "TrnClassRpt"
Case Is = 3
strReport = "R_TrainingClassDetail4DateRange"
DoCmd.RunMacro "TrainingbyDateRanges"
Case Is = 4
strReport = "Report all Active Emp"
Case Is = 5
strReport = "R_Active Emp By Dept"
Case Is = 6
strReport = "R_TrnTrxnScheduleDateRange"
DoCmd.RunMacro "TrainingScheduleDateRange"
Case Is = 7
strReport = "R_TrnTrxnClassRosterDateRange"
DoCmd.RunMacro "TrainingClassRosterDateRange"
Case Is = 8
Dim strWhere As String
strWhere = "1=1 "
If Not IsNull(Me.txtName) Then
strWhere = strWhere & " AND [Name] = """ & Me.txtName & """ "
End If
If Not IsNull(Me.CDesc) Then
strWhere = strWhere & " AND [Desc] = """ & Me.CDesc & """ "
End If
' add more controls and where conditions
strReport = "R_TrnHist4SpecificEmp"
DoCmd.OpenReport "R_TrnHist4SpecificEmp", acViewPreview, , strWhere
End Select
DoCmd.Close acForm, "f_ConfigRpts"
DoCmd.OpenReport strReport, acViewPreview
End Sub
Thanks so much for your help!!
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (6) |
Tidak ada komentar:
Posting Komentar