Hi,
I have a Macro running as a search function. 99.5% of the time it is working perfectly, however every so often it will throw a hizzy fit and crash the system,
I can't get a debug as the users who are doing it are running the DB in Access Runtime and of course it doesn't offer to debug into VBA. all they get is this
It happens when typing in so I assume it is related to the Macro which is set on update. the Macro is this
It's from one of the guides on here (for ease of pasting I removed the notes but if you do need them please let me know.
Anyway... rather than trying to work out the error without having debug, is there a way to get the system to create a crash/log file for the users?
It happens so infrequently I have yet been unable to recreate it in full access.
Cheers,
Graeme
I have a Macro running as a search function. 99.5% of the time it is working perfectly, however every so often it will throw a hizzy fit and crash the system,
I can't get a debug as the users who are doing it are running the DB in Access Runtime and of course it doesn't offer to debug into VBA. all they get is this
It happens when typing in so I assume it is related to the Macro which is set on update. the Macro is this
Code:
Private Sub SearchFor_Change()
Dim vSearchString As String
vSearchString = SearchFor.Text
SrchText.Value = vSearchString
Me.SearchResults.Requery
If Len(Me.SrchText) <> 0 And InStr(Len(SrchText), SrchText, " ", vbTextCompare) Then
Me.SearchResults = Me.SearchResults.ItemData(1)
Me.SearchResults.SetFocus
DoCmd.Requery
Me.SearchFor = vSearchString
Me.SearchFor.SetFocus
Me.SearchFor.SelStart = Me.SearchFor.SelLength
Exit Sub
End If
Me.SearchResults = Me.SearchResults.ItemData(1)
Me.SearchResults.SetFocus
DoCmd.Requery
Me.SearchFor.SetFocus
If Not IsNull(Len(Me.SearchFor)) Then
Me.SearchFor.SelStart = Len(Me.SearchFor)
End If
End Sub
It's from one of the guides on here (for ease of pasting I removed the notes but if you do need them please let me know.
Anyway... rather than trying to work out the error without having debug, is there a way to get the system to create a crash/log file for the users?
It happens so infrequently I have yet been unable to recreate it in full access.
Cheers,
Graeme