By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

Access keeps crashing

P: n/a
I'm working on an event procedure for a form - seems relatively
straightforward to me, but for some reason Access keeps crashing on
me. All the procedure is doing is checking to see if a recordset is
blank, and if not, opening up a form.

Any ideas why this might be happening? Here's the code I'm using:

Dim db As Database
Dim Active As Recordset

Set db = CurrentDb
Set Active = db.OpenRecordset("qryAnnualtoEnter")

'if there are employees to enter, open form, else give message saying
no employees to enter
If Active.BOF = True Then
MsgBox ("There are no employees without starting values at
this time."), vbInformation
Else
DoCmd.OpenForm "frmStartAnnualDataEntry"
End If

TIA,
Heather

Mar 8 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I would bet that one of the records in a table referenced by
qryAnnualtoEnter is corrupted. If compact/repair does not fix it, you will
need to recreate that table and copy the good records into it. Look for
tables with memo fields. To test, open each table and scroll though all the
records, Access will crash on the corrupted one, look for "ERROR" in the bad
field.

"hbean" <be*****@gmail.comwrote in message
news:11*********************@c51g2000cwc.googlegro ups.com...
I'm working on an event procedure for a form - seems relatively
straightforward to me, but for some reason Access keeps crashing on
me. All the procedure is doing is checking to see if a recordset is
blank, and if not, opening up a form.

Any ideas why this might be happening? Here's the code I'm using:

Dim db As Database
Dim Active As Recordset

Set db = CurrentDb
Set Active = db.OpenRecordset("qryAnnualtoEnter")

'if there are employees to enter, open form, else give message saying
no employees to enter
If Active.BOF = True Then
MsgBox ("There are no employees without starting values at
this time."), vbInformation
Else
DoCmd.OpenForm "frmStartAnnualDataEntry"
End If

TIA,
Heather

Mar 8 '07 #2

P: n/a
On Thu, 8 Mar 2007 12:46:18 -0600, "paii, Ron" <pa**@packairinc.com>
wrote:

If visual inspection is too cumbersome, write a few lines of code to
loop over all records, and within one record over all fields, reading
each value. The app will error (or crash - save all code before
running it) on the corrupted line.

-Tom.
>I would bet that one of the records in a table referenced by
qryAnnualtoEnter is corrupted. If compact/repair does not fix it, you will
need to recreate that table and copy the good records into it. Look for
tables with memo fields. To test, open each table and scroll though all the
records, Access will crash on the corrupted one, look for "ERROR" in the bad
field.

"hbean" <be*****@gmail.comwrote in message
news:11*********************@c51g2000cwc.googlegr oups.com...
>I'm working on an event procedure for a form - seems relatively
straightforward to me, but for some reason Access keeps crashing on
me. All the procedure is doing is checking to see if a recordset is
blank, and if not, opening up a form.

Any ideas why this might be happening? Here's the code I'm using:

Dim db As Database
Dim Active As Recordset

Set db = CurrentDb
Set Active = db.OpenRecordset("qryAnnualtoEnter")

'if there are employees to enter, open form, else give message saying
no employees to enter
If Active.BOF = True Then
MsgBox ("There are no employees without starting values at
this time."), vbInformation
Else
DoCmd.OpenForm "frmStartAnnualDataEntry"
End If

TIA,
Heather
Mar 9 '07 #3

P: n/a
Thanks for the advice. I think one of the forms was corrupted. I
ended up exporting everything I needed to a new database, and so far
it's been working fine.

Heather

Mar 12 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.