473,387 Members | 1,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Access keeps crashing

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
3 3949
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Eddie | last post by:
I have a MySQL-server running Innodb. We have installed ~ 2GB of memory in the server. In spite of this MySQL keeps crashing due to out-of-memory errors. The server is a dual xeon i686 running...
6
by: nobody | last post by:
Hi: I am using Visual Studio .NET 2003 and console project (disabled precompiled header). I am using _tcstok() which resolves to strtok in my case. It keeps crashing (unhandled error, access...
1
by: russ | last post by:
Hi I need some advice about ms-access limitations. i have some databases written by others i have been working with that keeps crashing. different on different computers, so it sounds like a...
47
by: ship | last post by:
Hi We need some advice: We are thinking of upgrading our Access database from Access 2000 to Access 2004. How stable is MS Office 2003? (particularly Access 2003). We are just a small...
4
by: Piedro | last post by:
Hi group I'm trying to run the msde setup from my program with the following piece of code and the msde setup just keeps crashing after it has run for a couple of seconds. If I try to run the setup...
1
by: someone | last post by:
Hi all, I have installed Visual Studio 2005 on Windows XP. Visual Studio keeps crashing every 10-15 minutes. Can you please tell me what can cause this poblem and how to fix it? Thanks.
1
by: Jeemo | last post by:
I've been tearing my hair out on this one. This effin' database keeps crashing on me while I'm doing query-related operations. System info: Access 2003 SP2 with all the latest updates on an XP...
1
by: Vincent | last post by:
The subject says it all...I keep trying to modify one of my reports programmatically. The new controls are added to the report successfully, but if I try to do anything with the report, such as...
6
by: wenmang | last post by:
Hi, all, I am trying to allocate some objects during application starts up. The objects are created through new operator, but for some reason, the application keeps crashing and here is the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.