ADP login by default

Posted on 2006-03-22
Medium Priority
Last Modified: 2012-05-05

I have a ADP project under MS access 2k as a front end of an SQL Server 2005 Backend. When I start my application, the login dialog box appear but the default username is the one that I used to create the application.

I would like to set the default login to the last username who succesfully log in (or something like that)

I know that I can change the login when I click on  File; Connexion. but in this case the new login become the default login.

Question by:monsieurx
  • 3
LVL 44

Expert Comment

by:Leigh Purvis
ID: 16262666
Could you not just distribute it without *any* login credentials set - and then the users go in from cold.

Author Comment

ID: 16269465
For sur it will be better than my login as default, but how can I set the default login to an empty value

I tried by file; connexion and it's imposible to let the login field empty because it give me an error that say something like "Impossible to connect to database"

LVL 44

Accepted Solution

Leigh Purvis earned 1600 total points
ID: 16269541
If you remove the connection altogether - no login - no server no database.
Then set them all in code as your app starts up the first time.
(Just an normal ADO connection string - set that as the application's connection)
LVL 44

Expert Comment

by:Leigh Purvis
ID: 16569022
By way of example

Dim strconn As String

strconn = "Provider=SQLOLEDB.1;Data Source=YourServer;User ID=UN;Password=PW;Initial Catalog=YourDatabase;"
CurrentProject.OpenConnection strconn

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question