Re: access crashing after filter
- From: "BruceM" <bamoob@xxxxxxxxxxxxxxxxx>
- Date: Thu, 10 May 2007 07:52:54 -0400
You have the Debug.Print line after the line that is causing the problem.
My suggestion was that a Debug.Print line *before* the problem line of code
would be of potential value. Debug.Print after the code has failed will
suggest nothing about the cause for the failure.
What happens if you comment out the line that is causing the crash? If the
recordset has been filtered properly, what do you hope to accomplish by that
line of code?
I very much doubt this is an inherent problem with Access. The application
crashes at a line of code and you seem to be wondering what is wrong with
the application. I would suggest that when posting such a question you
should include from the beginning relevant information such as that you are
using an ADO recordset and SQL server, the definition of variables (we can't
see that tRst has been declared at the form module level, or what it is),
and information such as the fact that the recordset is filtered properly
before the crash. If the code compiled without problems, that is worth
mentioning too.
<riyaz.mansoor@xxxxxxxxx> wrote in message
news:1178766832.488740.91880@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On May 9, 4:43 pm, "BruceM" <bam...@xxxxxxxxxxxxxxxxx> wrote:
It isn't so much a case of not understanding as not knowing you are using
SQL server and an ADO recordset. Maybe I should have known that from the
code, but I didn't. It seems you are saying that tRst.Filter = "my
filter"
results in the recordset tRst being redefined as a filtered recordset, so
that in the line Set Me.Recordset = tRst, Me.Recordset is now the
filtered
recordset without specifically applying the filter.
My comments about error handling still apply. If you use error handling
in
the procedure (or maybe set the code to break on all errors) you should
be
able to find out what error is causing the crash. If the code isn't
reaching your Debug.Print line, why not try putting a Debug.Print line
elsewhere, such as before the line that is causing the crash to see if
tRst
is what you expect?
from my second post.
successfullySet Me.Recordset = tRst 'Crash here after Form_Current completes
Debug.Print tRst.RecordCount
Also of note. When the crash message is displayed the form has
CORRECTLY updated to reflect the filtered results. Hence, it appears
its a problem inherent in Access.
I have already given up on this approach with Access
Riyaz
.
- Follow-Ups:
- Re: access crashing after filter
- From: riyaz.mansoor@xxxxxxxxx
- Re: access crashing after filter
- References:
- access crashing after filter
- From: riyaz.mansoor@xxxxxxxxx
- Re: access crashing after filter
- From: riyaz.mansoor@xxxxxxxxx
- Re: access crashing after filter
- From: BruceM
- Re: access crashing after filter
- From: riyaz.mansoor@xxxxxxxxx
- Re: access crashing after filter
- From: BruceM
- Re: access crashing after filter
- From: riyaz.mansoor@xxxxxxxxx
- access crashing after filter
- Prev by Date: Re: PopUp Form is blank white
- Next by Date: Re: Hide extra fields in a Continuous Forms
- Previous by thread: Re: access crashing after filter
- Next by thread: Re: access crashing after filter
- Index(es):
Relevant Pages
|