for the dates:
Code:
'check FilterBeginDate
Forms!form2.FilterBeginDate.SetFocus
If Len(Forms!form2.FilterBeginDate.Text) & "" > 0 Then
strWhere = strWhere & "([TransDate] >= #" & Forms!form2.FilterBeginDate.Text & "#) And "
End If
'check FilterEndDate
Forms!form2.FilterEndDate.SetFocus
If Len(Forms!form2.FilterEndDate.Text) & "" > 0 Then
strWhere = strWhere & "([TransDate] <= #" & Forms!form2.FilterEndDate.Text & "#) And "
End If
for the currency, I don't know what LIKE $20.00 is. Is it like $22 ? or $2200.00 ? Numbers should be = , not LIKE
Code:
'check FilterTransAmount
Forms!form2.FilterTransAmount.SetFocus
If Len(Forms!form2.FilterTransAmount.Text) & "" > 0 Then
strWhere = strWhere & "([TransAmount] =" & CCur(Forms!form2.FilterTransAmount.Text) & ") And "
End If
and for all the events in the search controls, don't use on_change, use after_update and forget the cursor positioning:
Code:
Private Sub cboFilterTransMethod_afterupdate()
Call tListBoxFilter
End Sub
Private Sub CboFilterToAccount_afterupdate()
Call tListBoxFilter
End Sub
Private Sub cboFilterFromAccount_afterupdate()
Call tListBoxFilter
End Sub
Private Sub FilterEndDate_afterupdate()
Call tListBoxFilter
' Me.FilterEndDate.SetFocus
' With Me.FilterEndDate
' .SelStart = Len(.Text)
' End With
End Sub
Private Sub FilterTransCode_afterupdate()
Call tListBoxFilter
' Me.FilterTransCode.SetFocus
' With Me.FilterTransCode
' .SelStart = Len(.Text)
' End With
End Sub
Private Sub FilterBeginDate_afterupdate()
Call tListBoxFilter
' Me.FilterBeginDate.SetFocus
' With Me.FilterBeginDate
' .SelStart = Len(.Text)
' End With
End Sub
Private Sub FilterTransAmount_afterupdate()
Call tListBoxFilter
' Me.FilterTransAmount.SetFocus
' With Me.FilterTransAmount
' .SelStart = Len(.Text)
' End With
End Sub