473,544 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.OpenRecordse t("qryAnnualtoE nter")

'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 "frmStartAnnual DataEntry"
End If

TIA,
Heather

Mar 8 '07 #1
3 3958
I would bet that one of the records in a table referenced by
qryAnnualtoEnte r 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******** *************@c 51g2000cwc.goog legroups.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.OpenRecordse t("qryAnnualtoE nter")

'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 "frmStartAnnual DataEntry"
End If

TIA,
Heather

Mar 8 '07 #2
On Thu, 8 Mar 2007 12:46:18 -0600, "paii, Ron" <pa**@packairin c.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
qryAnnualtoEnt er 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.goo glegroups.com.. .
>I'm working on an event procedure for a form - seems relatively
straightforwar d 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.OpenRecordse t("qryAnnualtoE nter")

'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 "frmStartAnnual DataEntry"
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
12890
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 kernel Linux 2.4.20-8smp redhat stock. Top shows mysql steadily consuming more resourses over a period of 2 hours, up to 1.2 Gb, before it...
6
7373
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 violation). Firt I thought my variable wasn't writtable (const) but it wasn't so I used literal as input but it still crashes.
1
2248
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 memory thing. i have some tables which are deveral hundred thousand records long and a few tens of records wide. will this cause a problem? is...
47
4485
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 company and this is a big decision for us(!) It's not just the money it's committing to an new version of Access!
4
1818
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 from start/run and then enter c:\msde\software\MSDESetup\setup /settings c:\msde\software\MSDESetup\setup.ini it works just fine but if I call it...
1
3278
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
3680
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 Pro machine. DB info: The database file in question is merely several queries based upon a single, linked Excel file of about 17,000 records that...
1
1437
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 save or preview, Access crashes. Does anyone have any ideas what the problem may be? Thanks. -Vincent
6
3124
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 debug trace: (gdb) where #0 0xb64349dd in _int_malloc () from /lib/tls/libc.so.6 #1 0xb6433ced in malloc () from /lib/tls/libc.so.6 #2 0xb659789e...
0
7431
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7370
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7714
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5920
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5305
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4924
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3415
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.