hi, I have an Access form I've inherited, which has some VBA code in it.
part of this code allows the user to type into a parameter box.
I'd like to get rid of this bit of code, but don't know exactly which bit of the code to rem out without upsetting the rest of it
I'd copied it below - I'd like to get remove the DOB part, just that bit, please. My users don't need to filter on DOB anymore.
Any help is as always very much appreciated
thanks
lynne
Private Sub cmdOkay_Click()
'Working Set Variables
Dim strWhere As String 'String to Hold Where Clause.
'Check for Presence of Start and End Dates
If (Me.txtDateStart.Value <> "" And (Me.txtDateEnd.Value <> "" Then
'Assign Where Clause
strWhere = "[DOB] Between #" & Format(Me.txtDateStart, "dd mmm yyyy" & "# And #" & Format(Me.txtDateEnd, "dd mmm yyyy" & "#"
End If
'Open the Specified Report Applying Filter if Required.
DoCmd.OpenReport Me.cmbReport.Value, acViewPreview, "", strWhere
End Sub
part of this code allows the user to type into a parameter box.
I'd like to get rid of this bit of code, but don't know exactly which bit of the code to rem out without upsetting the rest of it
I'd copied it below - I'd like to get remove the DOB part, just that bit, please. My users don't need to filter on DOB anymore.
Any help is as always very much appreciated
thanks
lynne
Private Sub cmdOkay_Click()
'Working Set Variables
Dim strWhere As String 'String to Hold Where Clause.
'Check for Presence of Start and End Dates
If (Me.txtDateStart.Value <> "" And (Me.txtDateEnd.Value <> "" Then
'Assign Where Clause
strWhere = "[DOB] Between #" & Format(Me.txtDateStart, "dd mmm yyyy" & "# And #" & Format(Me.txtDateEnd, "dd mmm yyyy" & "#"
End If
'Open the Specified Report Applying Filter if Required.
DoCmd.OpenReport Me.cmbReport.Value, acViewPreview, "", strWhere
End Sub