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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Msg: Microsoft Access has encountered.....

Status
Not open for further replies.

batteam

Programmer
Sep 12, 2003
374
US
One of our users is getting the error msg: "Micorsoft Access has encountered a problem an needs to close. We are sorry for this inconvenience."

Many others are using the application (a .adp project with sql back end tables) with no problems. Anyone have any ideas why this one user would encounter this error message - intermittently? Thanks for you help.
 
How is the ADP being run?

Is it on a share where all users run it from the share. If so this will probably cause other issues as well.

I use a VB script to copy and rename the ADP so that each user is running from a seperate copy of the ADP. This also allows me to role in changes without having to force everyone out. I can copy the new ADP over the old one and tell everyone to exit the app and go back in.

Also, make it an ADE file before deploying to help keep your users from changing things.

Here is the VB script I use. Just change the name of the ADE.ADP match yours and place it in the same directory.

What it does is copies the ADE/ADP changing the name to the users network logon name and runs it from the same directory (you can easily change the file locations to meet your needs) then it deletes the copy when the users closes Access. This also allows you to quickly see who is running the application as well.

I also change the ADE attributes to HIDDEN so that the users don't try to run the ADE directly, and as a bonus the copies are also hidden.

Remeber to be able to see the files you will have to change your file browser to show hidden files and folders.

Code:
Set WshNetwork = WScript.CreateObject("WScript.Network")
Const OverwriteExisting = True

strUser = WshNetwork.UserName

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile ".\[COLOR=red yellow]MYAPP_SQL.ade[/color]" , ".\" & strUser & ".ade", OverwriteExisting

Run ".\" & strUser & ".ade"

objfso.DeleteFile ".\" & strUser & ".ade"

Sub Run(ByVal sFile)
Dim shell
Set shell = CreateObject("WScript.Shell")
    shell.Run Chr(34) & sFile & Chr(34), 1, True
    Set shell = Nothing
End Sub



Thanks

John Fuhrman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top