G
Gina Whipp
Hello All,
I have a filter that runs once the combo box is updated. I get the message
No FIlter but the filter itself does not work. Can someone tell me what I
am missing. Oh, when you open the form it is not filtered.
Thanks for any and all help...
Gina
Sub Form_Open(Cancel As Integer)
Me!cboListTypeID.RowSource = "SELECT tblListingType.ltListingTypeID,
tblListingType.ltListingTypeName FROM tblListingType WHERE
(((tblListingType.ltListingTypeID)=""A"" Or
(tblListingType.ltListingTypeID)=""M""));"
Sub cboListTypeID_AfterUpdate()
'On Error Resume Next
Dim strFilterSQL As String
If Not Me.cboListTypeID = "" Then
Select Case cboListTypeID
Case "A"
strFilterSQL = ""
MsgBox "No Filter"
Case "M"
strFilterSQL = "[btBrokerID] = Forms![frmLogOn]![cboLoginID]"
Me.Form.AllowAdditions = False
Case Else
strFilterSQL = "[llListingTypeID] = '" & cboListTypeID & "'"
Me.Form.AllowAdditions = False
End Select
End If
Me.FilterOn = True
Me.Filter = strFilterSQL
Me.Requery
I have a filter that runs once the combo box is updated. I get the message
No FIlter but the filter itself does not work. Can someone tell me what I
am missing. Oh, when you open the form it is not filtered.
Thanks for any and all help...
Gina
Sub Form_Open(Cancel As Integer)
Me!cboListTypeID.RowSource = "SELECT tblListingType.ltListingTypeID,
tblListingType.ltListingTypeName FROM tblListingType WHERE
(((tblListingType.ltListingTypeID)=""A"" Or
(tblListingType.ltListingTypeID)=""M""));"
Sub cboListTypeID_AfterUpdate()
'On Error Resume Next
Dim strFilterSQL As String
If Not Me.cboListTypeID = "" Then
Select Case cboListTypeID
Case "A"
strFilterSQL = ""
MsgBox "No Filter"
Case "M"
strFilterSQL = "[btBrokerID] = Forms![frmLogOn]![cboLoginID]"
Me.Form.AllowAdditions = False
Case Else
strFilterSQL = "[llListingTypeID] = '" & cboListTypeID & "'"
Me.Form.AllowAdditions = False
End Select
End If
Me.FilterOn = True
Me.Filter = strFilterSQL
Me.Requery