ADP login by default

Posted on 2006-03-22
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
    LVL 44

    Expert Comment

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

    Author Comment

    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

    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
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now