Re: access crashing after filter
- From: "riyaz.mansoor@xxxxxxxxx" <riyaz.mansoor@xxxxxxxxx>
- Date: 7 May 2007 01:53:56 -0700
Dim fil As String
If cmbFilter.Value = "None" Then
fil = ""
ElseIf cmbFilter.Value = "Current" Then
fil = "B_Completed=0 AND B_Waived=0 AND B_Loss=0"
ElseIf cmbFilter.Value = "Completed" Then
fil = "B_Completed=1"
ElseIf cmbFilter.Value = "Waived" Then
fil = "B_Waived=1"
ElseIf cmbFilter.Value = "Loss" Then
fil = "B_Loss=1"
Else
Err.Raise 1024, "error"
End If
Set tRst = Me.Recordset
tRst.Filter = fil
If tRst.RecordCount = 0 Then
cmbFilter.Value = "None"
tRst.Filter = ""
tStr = "No records to list. Reverting back to NO filter"
MsgBox tStr, vbInformation, TITLE
End If
Set Me.Recordset = tRst 'Crash here after Form_Current completes
successfully
Debug.Print tRst.RecordCount
Correction on my previous post. cmbFilter.AfterUpdate does NOT
complete. On the line highlighted above, the Form_Current method
executes successfully but upon returning from Form_Current, it crashes
on the same line. It does NOT reach the DEBUG statement.
Please help.
Riyaz
.
- Follow-Ups:
- Re: access crashing after filter
- From: AccessVandal via AccessMonster.com
- Re: access crashing after filter
- From: BruceM
- Re: access crashing after filter
- References:
- access crashing after filter
- From: riyaz.mansoor@xxxxxxxxx
- access crashing after filter
- Prev by Date: access crashing after filter
- Next by Date: Re: Control Button
- Previous by thread: access crashing after filter
- Next by thread: Re: access crashing after filter
- Index(es):
Loading