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

Startup script and security

Status
Not open for further replies.

Nazgul79

MIS
May 30, 2001
12
AU
I have had a problem with my secured, split database losing its connection to JRO, so I have found some code which checks if the JRO connection is there on startup and if it isnt it adds JRO. this work great for me, as a database administrator, but doesnt run when i log on as a user.

the point of adding the code to the system was so i wouldnt have to go to every computer and re-connect JRO.

can anyone help with getting the code to run as a User?

code is:

Private Sub Form_Load()
Dim ref As Reference
Dim refName As String
Dim refFound As Boolean

refFound = False
refName = "JRO"

For Each ref In Application.References
If ref.Name = refName Then
refFound = True
End If
If ref.Name = refName And ref.IsBroken = True Then
References.Remove References!refName
References.AddFromFile "C:\program files\common files\system\ado\msjro.dll"
MsgBox "A problem has been detected." & vbNewLine & _
"The problem has been resolved but the database will now close." & vbNewLine & _
"Double click on ICMIS to restart the databaes", vbExclamation
DoCmd.Quit
End If
Next
If refFound = False Then
References.AddFromFile "C:\program files\common files\system\ado\msjro.dll"
MsgBox "A problem has been detected." & vbNewLine & _
"The problem has been resolved but the database will now close." & vbNewLine & _
"Double click on ICMIS to restart the databaes", vbExclamation
DoCmd.Quit
End If
End Sub


thanks
 
The problem might be that msjro.dll might be in a different Location on different PC's. There's a Tip here that allows for this:

thread181-437632

Regards

Bill
 
In my office every user uses a standard operating environment, so msjro.dll is the same version and in the same place on all PCs.

Also, when i was testing the code i listed above i tested it on my PC, which uses the same SOE as everyone else, and just unticked the msjro box in the References section and then closed the system and logged in using a User account.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top