Verify if user has DSN connection on their system ?

jkpats12

Registered User.
Local time
Today, 06:58
Joined
Jan 27, 2004
Messages
45
Hi everyone,

I was wondering if there was a way through code to verify if a DSN connection is set up on a user's system, and if it is not create a message box pop up letting them know they need to contact the tech group for the install ?

I've seen code within this site to set up the DSN connection, but the actual DSN connection responsibility lies within a different area, so I can not use that.

Thanks for any assistance !!
 
If you can get the folks who are responsible to do so, you can use a FILE DSN which would then, if put in an accessible place, be useable instead of having to have each machine have it installed. We did that at my old place of employment (a rather large health care provider).
 
Thanks Bob, but I don't think I can get them to change their ways unfortunately.

I was hoping when the users access the database to just let them know via message box they need to contact the group for the install, I would prefer that rather than the ODBC connection fail message popping up since there will be some "non-technical" users who may not understand the message & not know what to do.

Any other thoughts would be appreciated.

Thanks again
 
What you MIGHT be able to do (Can't guarantee anything as I've not had this before), is to trap for that error message (if you can, not even sure that's possible) and display the message from that.
 
I'll give that a shot & keep you posted.....again thanks for your time & help !!
 
All set Bob.....came up with this:


Private Sub DSN_Check_Click()

On Error GoTo Err_DSN_Check_Click

DoCmd.OpenQuery "Query1", acViewNormal

Exit_DSN_Check_Click:
Exit Sub

Err_DSN_Check_Click:
MsgBox "Your Message Here.", vbOKOnly, "WARNING"
Resume Exit_DSN_Check_Click
End Sub


Thanks again
 

Users who are viewing this thread

Back
Top Bottom