T
tiger0268 via AccessMonster.com
I am currently trying to add a filter to a form that shows all records. I
use the combo to add various types of filters to the form so I cannot change
the query behind it. I am attempting to create a filter that shows all
accounts that are pending. This is what I got so far:
Private Sub PendingCbo_Change()
If Me.PendingCbo.Value = "ComboValue" Then
Me.Filter = ([Forms]![FormName]![AccountRequested] = Yes) And (([Forms]!
[FormName]![AccountDenied] = No) Or ([Forms]![FormName]![AccountCreated] = No)
)
Me.FilterOn = True
Me.RcrdCnt.Value = Form.RecordsetClone.RecordCount
Me.RcrdCnt.Visible = True
Me.CloseBtn.SetFocus
End If
End Sub
The basic logic of the filter is to grab all records where a person has
requested for an account, but their account hasn't been created or denied
access. I am fairly good with VBA, but I am relatively new to using filters
so could someone just point me in the right direction.
Many Thanks!
use the combo to add various types of filters to the form so I cannot change
the query behind it. I am attempting to create a filter that shows all
accounts that are pending. This is what I got so far:
Private Sub PendingCbo_Change()
If Me.PendingCbo.Value = "ComboValue" Then
Me.Filter = ([Forms]![FormName]![AccountRequested] = Yes) And (([Forms]!
[FormName]![AccountDenied] = No) Or ([Forms]![FormName]![AccountCreated] = No)
)
Me.FilterOn = True
Me.RcrdCnt.Value = Form.RecordsetClone.RecordCount
Me.RcrdCnt.Visible = True
Me.CloseBtn.SetFocus
End If
End Sub
The basic logic of the filter is to grab all records where a person has
requested for an account, but their account hasn't been created or denied
access. I am fairly good with VBA, but I am relatively new to using filters
so could someone just point me in the right direction.
Many Thanks!