Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switchboard does not load - XP and 2000

Status
Not open for further replies.

anasazii

Programmer
Jun 19, 2001
59
0
0
US
I have a shared front end database with users using XP and 2000. Database was originally developed in 2000. I was switched over to XP about 1-2 months ago, and have been maintaining it in XP.

About 2 weeks ago, XP users could not open the database. They would not receive a runtime error - the database would open and the Access error message would appear. (The one that prompts you to send a report to MS). If a user with 2000 would open the database, the Switchboard would open with the label and one button showing, nothing else.

When I tried stepping through the code with XP, I did not receive any errors and the Switchboard form then opened - no error. If I closed the db and opened again - no error. I restored the front end from a dev copy and checked it before I went home at night and the error was back.

I ended up creating a new front end for the XP users by importing everything into a blank XP database. I also rebuilt the Switchboard using XP. So far, the users have not (knock on wood) received the error again.

Has anyone ever experienced anything like this? I would like to know what caused it if anyone has any suggestions. I have not been able to get the error/situation to recreate itself with test copies. I also could not find anything on MS or this website.

Thanks, Janel
 
Janel:
"..... I also could not find anything on MS or this website."

And you wont. That's seems to be a DB corruption, i can't assure this, but i'd faced some times this behavior when users do not close the app. in the right way. and ldb's are all over the directory where the applications is.
I did the same you did, and worked for me.
Since then i include an invisible form to evoid users close the db from any where. So i force them to use the app in the way it was designed for.
The fact you create a different front end for each Access version, i guess was the best (and long lasting) solution
I really hope you don't get more problems with it.

Good luck

Estuardo
 
Hi,
I face the same problem , I didn't exactly understood what I should do.
can you please give me the detail of what I should do?
Thanks
Maya
 
G'd afternoon Maya!
This err use to happens for many reasons, first you should check that there is no .ldb file in the application directory when the it is not open, if you find this file with the application closed, delete it. Compile your db (it wont work for Access 97) just type this in the command line or open the run dialog box (Menu--> Run)and type

access /decompile <your database name>

but please first make a backup of your db and read this


You may also want to read this article from the MS Kb

and finally here is the result of a quick search MS Kb

For access 97 you may want to read this:

So far we almost have all the info to repair our Jet dbs, but... how to avoid it? well i don't know for sure but along all this time i found that this had stoped to happen since i do the following:

1. Make backUps of my Jet db and FE
2. Stop users from exit access without closing the app.
3. Keep all my front ends with the same MDAC versions, all Office Updated (service packs applied)
4. Avoid ActiveX controls when posible

To solve your inmediate problem: create a new db and import all its objects (table relationships included)compile it, compact & repair it, make another copy, zip it and keep it in a safe place.
Now
Create a new form with no controls at all,this must be the first form to open (You can do this with a macro or throug the Main menu -> Tools --> Start Up) just with two events, Open and Unload. In the open event:

Private Sub Form_Open(Cancel As Integer)
Me.visible = false
bolOk = False
End sub

In the Unload event

Private Sub Form_Unload(Cancel As Integer)

Me.Visible = False
If bolOk Then
'ok
Me.Visible = False
Else
MsgBox "You must close the application from the main menu", vbCritical, "Wrong way to close"
Cancel = True
Me.Visible = False
End If
End Sub

The boolean variable bolOk must be declared as public, in the application's main menu add a button to close the db and swicth the boolean value to true.
That's it. Your done. If you need further assistence please let me know.

Good luck
Estuardo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top