It runs perfectly on my laptop and my desktop, but always gives run-time error 5 on 2 of my co-workers computers.
This is where it stops.
I have checked reference on all computers made sure they have the same order.
just checked again, we have the same versions of Access (2003 SP3), Visual Basic(6.5) and same OS Windows XP Pro SP3
This is where it stops.
If strfilter <> strOldFilter Then
Can anyone help please? Thanks!Private Sub CheckFilter()
Dim strfilter As String
Dim strOldFilter As String
strOldFilter = Me.Filter
'Building - number
If Me!Building > "" Then _
strfilter = strfilter & _
" AND ([Building.Building ID]=" & _
Me!Building & ")"
'Location - Numeric
If Me!Location > "" Then _
strfilter = strfilter & _
" AND ([Location.location ID]=" & _
Me!Location & ")"
'Debug.Print ".Filter = '" & strOldFilter & "' - ";
'Debug.Print "strFilter = '" & strFilter & " '"
'Tidy up results and apply IF NECESSARY
If strfilter > "" Then strfilter = Mid(strfilter, 6)
If strfilter <> strOldFilter Then
Me.Filter = strfilter
Me.FilterOn = (strfilter > "")
End If
End Sub
I have checked reference on all computers made sure they have the same order.
just checked again, we have the same versions of Access (2003 SP3), Visual Basic(6.5) and same OS Windows XP Pro SP3
Last edited: