G
Guest
Private Sub FindDate1_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[NTId] = " & Str(Me![FindDate1])
Me.Bookmark = rs.Bookmark
End Sub
Private Sub FilteredRecords1_AfterUpdate()
If FilteredRecords1 = 2 Then
Me.Filter = "NTDueDate = " & Format(Me.FindDate1, "\#mm\/dd\/yyyy\#")
Me.FilterOn = True
Else
Me.FilterOn = False
End If
I have adopted the above code first to find a date in a record set and then
filter the records based on the date found. I have an option group which
shows all records as the default and if a date is found and I choose option
2, I am expecting to get only those records with the due dates found.
Finding the date and the first matching record is fine however when I choose
option 2 an empty record is displayed. FindDate1 is a combo box and
FilteredRecords1 is an option group with 2 options show all records and show
only the records found. Am I missing something here? Any suggestions/
assistance would be greatly appreciated
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[NTId] = " & Str(Me![FindDate1])
Me.Bookmark = rs.Bookmark
End Sub
Private Sub FilteredRecords1_AfterUpdate()
If FilteredRecords1 = 2 Then
Me.Filter = "NTDueDate = " & Format(Me.FindDate1, "\#mm\/dd\/yyyy\#")
Me.FilterOn = True
Else
Me.FilterOn = False
End If
I have adopted the above code first to find a date in a record set and then
filter the records based on the date found. I have an option group which
shows all records as the default and if a date is found and I choose option
2, I am expecting to get only those records with the due dates found.
Finding the date and the first matching record is fine however when I choose
option 2 an empty record is displayed. FindDate1 is a combo box and
FilteredRecords1 is an option group with 2 options show all records and show
only the records found. Am I missing something here? Any suggestions/
assistance would be greatly appreciated