Form_Current Event and a filter Error

  • Thread starter Thread starter Hoardling via AccessMonster.com
  • Start date Start date
H

Hoardling via AccessMonster.com

Running Access 2003 and SQL Server 2000
My problem is I have a form with a currentevent. When my users try running a
filter, they get an error saying that Access had a problem and do you want to
compact and repair. Now I know it is my current event, because I can comment
it out and the error doesn't happen any more. I am using pass throughs to
stored procedures, so I can't do subforms. I used a listbox for this then,
this listbox is updated everytime a record is chosen. Is there a maximum
processing during current event before problems happen???
This is the Form Current:
Private Sub Form_Current()
'Update listbox for Exam
If Not IsNull(mID.Value) Then
Call ViewExam(4, Me.mID.Value)
Me.lstExamMortgage.Requery
End If
End Sub

Any ideas??
 
Sounds like you have a problem either with the listbox that's being requeried
(possibly with the list's RowSource), or more likely there's a problem in the
ViewExam subroutine. No way to know what that problem might be without more
info on those. I'd do some debugging and step through the Current event to
see exactly when the error occurs.
 
Thanks for the answer. The current event works fine. When going through the
records navigation the current event triggers just fine. The problem happens
when users try using the filter on the form. A error pops about access has
encountered a problem and needs to close. Then I have the option to repair
my database, which I have done. I am thinking that the form current is
processing too much. Not sure though.

Sounds like you have a problem either with the listbox that's being requeried
(possibly with the list's RowSource), or more likely there's a problem in the
ViewExam subroutine. No way to know what that problem might be without more
info on those. I'd do some debugging and step through the Current event to
see exactly when the error occurs.
Running Access 2003 and SQL Server 2000
My problem is I have a form with a currentevent. When my users try running a
[quoted text clipped - 14 lines]
Any ideas??
 
Ok, I am truly under the impression that the requering the listbox is whats
causing the problem in the Current Event. I commented out the listbox and my
code works, not properly like it should, but no errors. So the question
becomes how does requering a listbox in the Form Current Event and filtering
at the same time cause errors.

Thanks for the answer. The current event works fine. When going through the
records navigation the current event triggers just fine. The problem happens
when users try using the filter on the form. A error pops about access has
encountered a problem and needs to close. Then I have the option to repair
my database, which I have done. I am thinking that the form current is
processing too much. Not sure though.
Sounds like you have a problem either with the listbox that's being requeried
(possibly with the list's RowSource), or more likely there's a problem in the
[quoted text clipped - 7 lines]
 
Ok, I figured it out. the requery wasn't working properly, so I changed my
vba code on Current form. The code no longer uses the listbox.requery setup.
I changed it so the the listbox.rowsource = and I added my listbox's SQL
statement. Kinda a requery, but not really. Interesting to see that requery
wasn't working on this scenario very well.
Ok, I am truly under the impression that the requering the listbox is whats
causing the problem in the Current Event. I commented out the listbox and my
code works, not properly like it should, but no errors. So the question
becomes how does requering a listbox in the Form Current Event and filtering
at the same time cause errors.
Thanks for the answer. The current event works fine. When going through the
records navigation the current event triggers just fine. The problem happens
[quoted text clipped - 8 lines]
 
Back
Top