Private Sub Report_Open(Cancel As Integer)When my form opens I am prompted for the business unit. When a valid business unit is entered Access brings up a second prompt with the title: "Enter Parameter Value" with the value of my filter variable where the text prompt would go: (ex. DB69A would show as the text for the second prompt).
'Prompts for business unit when run educational assistance reports.
Dim strBusUnitName As String
strBusUnitName = UCase(InputBox("Enter Business Unit or click OK for all.", "Business Unit", "All"))
Me.Filter = ""
Select Case strBusUnitName
Case Is = "DB17A", "DB50A", "DB69A", "DB70A", "DB71A", "DB85A"Me.Filter = "[EmpBusinessUnit]= " & strBusUnitNameCase Is = "ALL"
Me.FilterOn = TrueMe.FilterOn = FalseCase Is = ""Me.FilterOn = FalseCase Else
Cancel = TrueMsgBox "Business Unit Not Found. Please Verify and Retry."End Select
Cancel = True
Can someone please tell me how to get rid of this second prompt and get access to use the value I am passing in variable strBusUnitName to filter the report.
Thank you.