ENCOUNTERED A PROBLEM

S

Sammie

Recently, Access 2003 has been crashing on me. I get the error
"Microsoft Office Access has encountered a problem and needs to close.
We are sorry for the inconvenience." I have the option to send an error
report to Microsoft, but I receive no details about the error I am
encountering. I have noticed that I tend to get this error when I am
using a form and I have filtered the records. Does anybody know what
might be causing this error, and what I can do about it?
Thanks.
Sammie
 
D

Dodo

Recently, Access 2003 has been crashing on me. I get the error
"Microsoft Office Access has encountered a problem and needs to close.
We are sorry for the inconvenience."

Have you tried "Compact and Repair"?
 
G

Gina Whipp

You didn't mention, have you added (or subtracted) any code to the forms
event? Have you loaded any new software?
 
S

Sammie

Gina said:
You didn't mention, have you added (or subtracted) any code to the forms
event? Have you loaded any new software?


Have you tried "Compact and Repair"?
Yes, I have added code to the form's event, but I have no idea which
code I have added recently. I have code in the following form events:
on current, before update, on undo, on open, on load, on unload, and on
error. I am most likely to have added code to the on current event out
of all of these. I have tried compact and repair. In fact, when it
crashes, I get a backup option and it compacts and repairs
automatically. Thanks.
Sammie
 
S

Sammie

Gina said:
You didn't mention, have you added (or subtracted) any code to the forms
event? Have you loaded any new software?


Have you tried "Compact and Repair"?
Also, no new software loaded. Sorry, forgot to mention this on my
earlier reply.
 
G

Gina Whipp

Can you copy the code and paste it here, that way me (and everyone else) can
see if there is something in the code. You want to copy and paste the code
for the form that is causing the crash.


 
G

Guest

Dear Gina
Thanks for your reply. I have 54 pages of code associated with this form.
(Could that be part of my problem??) Anyway, most of that code has existed
for many months without problem, so I decided to give you some of the code I
remember adding since this problem started. Only about 1 page of code is
pasted here.
Thanks,
Sammie

Option Compare Database ' Use database order for string comparisons.
Option Explicit ' Requires variables to be declared before they are used.

Private Sub Form_Current()
'Put a red box around the calculate button if TotCIP is not posted.
If IsNull(TotCIP) Then
Box802.Visible = True
Else
Box802.Visible = False
End If

'Make credit page disappear on regular invoices.
If Disposition = "shipped" Then
CreditPage.Visible = False
Else
CreditPage.Visible = True
End If

'Mark the Warranty Verbiage check box correctly.
If InvoiceComment Like "Warranty*" Then
WarrantyVerbiage = -1
Else
WarrantyVerbiage = 0
End If

'Show detail on warranty tab correctly.
If Disposition = "Warranty" Then
ActivateWarranty = -1
Else
ActivateWarranty = 0
End If

If ActivateWarranty = 0 Then
frmWarranty.Visible = False
ShipDateWarranty.Visible = False
Else
If ActivateWarranty = -1 Then
frmWarranty.Visible = True
ShipDateWarranty.Visible = True

End If
End If

'Lock the record if a year closed date has been posted. To unlock, remove
the date in the yearclosed field.
If Not IsNull(YearClosed) Then
Me.Invoice_Subform.Enabled = False
ShipTypeOption.Enabled = False
Shipping.Enabled = False
Ship_Date.Enabled = False
Ex_Whse.Enabled = False

LockedMessage.Visible = True
LockedMessage1.Visible = True


Else
Me.Invoice_Subform.Enabled = True
ShipTypeOption.Enabled = True
Shipping.Enabled = True
Ship_Date.Enabled = True
Ex_Whse.Enabled = True
LockedMessage.Visible = False
LockedMessage1.Visible = False

End If
 
G

Gina Whipp

Okay, no want 54 pages to read :cool:

I don't see anything... but what I would do is REM out the code and if it
doesn't crash, add a section at a time. If it still crashes after REMming
then it's not these lines.
 
S

Sammie

Gina said:
Okay, no want 54 pages to read :cool:

I don't see anything... but what I would do is REM out the code and if it
doesn't crash, add a section at a time. If it still crashes after REMming
then it's not these lines.
OK Gina. I'll be gone for days remming & unremming.
Will you see me if I come back under this same post in a week or so, or
should I post a new question if I find some troublesome code?
Thanks.
Sammie
 
S

Sammie

Gina said:
I'll be watching this post so please don't post a new one...
Hi Gina
Didn't take me days. I took an old, uncorrputed copy of the form from a
backup and added code bit by bit to bring the form up to date. The form
no longer crashes!
Thanks for your help.
Sammie
 
G

Gina Whipp

Sammie,

Even though the form doesn't crash anymore YIPPEE!!! You should still
(oneday) take the time to find out why it did. Might have been corruption
and in that case it could happen again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top