473,287 Members | 1,419 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,287 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 3945
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: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.