Urgent Help Required

Bigjayce

New member
Local time
Today, 11:02
Joined
Aug 10, 2007
Messages
8
we have a database written in Access 2000 and when we try to run it on Access 2003 98% of it works but a very important form crashes the app everytime, this must be an incompatability but where, can any kind sole help??

The button in question runs this:

Private Sub Command168_Click()
On Error GoTo Err_Command168_Click

Dim stDocName As String
'in case of new record entry, update records for report query
Me.Refresh

stDocName = "rptJobCard"
DoCmd.OpenReport stDocName, acPreview

Exit_Command168_Click:
Exit Sub

Err_Command168_Click:
MsgBox Err.Description
Resume Exit_Command168_Click

End Sub

If anyone can help please get back to me, just ask what you need code wise and I'll send it

Jayce
 
Where does it crash. Which line is highlighted?
 
Hi Jayce,

Where does your error occure and what is it?

Grtz
 
It doesn't, thats one of the problems, it doesn't crash to VBA it just crashes Access, when the button is clicked it opens the preview then crashes :(
 
It doesn't, thats one of the problems, it doesn't crash to VBA it just crashes Access, when the button is clicked it opens the preview then crashes :(

I've had a similar problem when using the Docmd.OpenReport when the report itself had an error in it. Try opening the report normally not through VBA and see if there is an error.
 
You can run an Access 2000 DB on Access 2003. Have you converted your DB from A2000 to A2003? If so does your A2000 database(unconverted) run OK on Access 2003.

It might be worthwhile on the VBA Editor going in the Tools --> References and checking there are no errors.
 
Last edited:
The same thing happens when the database is converted and unconverted, I have opened the report without running the program and it opens fine.

I also cannot see any relationship problems :(
 
To clarify I meant the references in Tools not relationships. I was typing and helping someone else at the same time. apologies. I will edit my original post
 
I've checked the references in the VBA editor screen and everything looks ok nothing missing, no files missing etc
 
Update, the same thing happens when you try to open ANY report from inside the forms
 
Looking at access help I think it should be

DoCmd.OpenReport stDocName, acViewPreview
 
Did you already tried to pinpoint the problem by putting a breakpoint in your code? If you can't pinpoint it that way, perhaps your database is corrupt. Compact end Repair could then be the solution or as a last resort copy all the object to a clean empty database.

Enjoy!
 
I have experience of converting Access97/2000 to Access 2003 (I've done about 90 dbs)

and in my experience you need to convert the database from the tools menu and not when you open the db. it seems that the conversion does not resolve references correctly when run after opening the db with Access 2003. Also don't forget to set the Maco security level to low.
 

Users who are viewing this thread

Back
Top Bottom