Hi Daniel,
After *carefully* reading your request I don't "think" it's possible.
No code in the database is executed BEFORE the login form appears. Period.
So any attempt to load a predetermined value into a text field on the login form
will simply not work given that restriction. In addition, you cannot make ANY
changes to the login form that appears on a secured Access database. There is
no exposure of this object for the developer to change.
I see only two possibilities for you:
1. As Rick mentioned, the login screen by default will display the last user name who
used the database. So they only have to type in their user name once. After that all
they would have to do is enter their password. Would that not suffice?
2. Create your own login form in a second unsecured database. Since it is unsecured
there will be no login prompt. You create a single pop-up, modal form in this database
and set it to be the Startup form. Using code you automatically fill in the User Name
text field for them. All they have to do is fill in the password text box and hit an OK
button. Code behind the OK button opens up your secured database, passes in the
user name and password from the text boxes, and then closes the unsecured database.
To the user they'll never even know they are working with two databases for a brief
second. Just an idea.
**Note** If the user name/password combination entered is invalid, the user will
STILL be presented with the default Access login form for the secured database!
So then you're back to square one though!
Jeff Conrad
Access Junkie
Bend, Oregon
Daniel P said:
Graham,
Could you give me a little more info...
where do I need to use this code? I have been unable to locate the actual logon form...where is
it store? Is this code to be used witht the logon form?!