M
miatadiablo
I have a form that is filtered On Open. How do I update the code for
my unbound search box to list only records based on the form's OnOpen
filter instead of all records? I might mention that on the same form
I have a set of option buttons that filter the form (same field)
OnClick. How do I keep my unbound search box filtered based on the
form's filter?
Here's what I have:
Private Sub Form_Open(Cancel As Integer)
Me.optActive.Value = 1
DoCmd.ApplyFilter , "Status = 'Active'"
End Sub
Private Sub cboSearchCorps_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[AutoNum] = " & Str(Nz(Me![cboSearchCorps], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
As always, many thanks for anyone's attention and input
my unbound search box to list only records based on the form's OnOpen
filter instead of all records? I might mention that on the same form
I have a set of option buttons that filter the form (same field)
OnClick. How do I keep my unbound search box filtered based on the
form's filter?
Here's what I have:
Private Sub Form_Open(Cancel As Integer)
Me.optActive.Value = 1
DoCmd.ApplyFilter , "Status = 'Active'"
End Sub
Private Sub cboSearchCorps_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[AutoNum] = " & Str(Nz(Me![cboSearchCorps], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
As always, many thanks for anyone's attention and input