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!

Need SQL server login prompt when .mde invoked before U C Switchboard

Status
Not open for further replies.

elviajero

MIS
Feb 8, 2001
40
US
I've got an Access front with a SQL back end. I notice that when you go from the switchboard to a form that accesses any of the SQL tables, SQL server gives you a login prompt.

I'd like this login prompt to occur when the shortcut to the .mde is first invoked before the user even sees the Switchboard. I know it's possible as I've seen it done on another database here. Any ideas?
 
One way you can do it is in the Form_Load sub of your switchboard form you can go ahead and open a connection(ADO) or workspace (DAO) - whichever protocol you are using.

If you wanted to make it cleaner, you could also create a login form that will load first (before Switchboard). Have the user enter their username and password in your custom form (instead of the generic form), and then if/when the connection opens successfully you can open the Switchboard form. If their login doesn't work (invalid user/password/whatever) you can prompt them to re-enter or quit.
 
Sorry it took me so long to reply to this.

If I wanted to do the first option, I don't know which protocol I'm using. Could anyone help with the code I would use to accomplish this? It would be most appreciated.
 
What I wound up doing was just linking a Switchboard from SQL to the database to open on startup, causing the regular SQL server login to come up. It caused the effect I wanted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top