Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > User Level Security 1 < Data Types | User Level Security 2 >
Back to User Level Security    Comments List
Upload Images   Link   Email  
username and password
Nathan Shepard 
      
15 months ago
Attached is the code.  For some reason  The username and password do not erase and carryover to the next time I load that subroutine.

Open to suggestions?
attached is the code and screen layout and what it does
Is there a option in the properties that I can turn on to erase the username and password?
Scott Axton 
          
15 months ago
Nothing here.  Try again.
Nathan Shepard OP 
      
14 months ago
This is the code.  I reversed the code so that it closes the logon screen then opens the next screen.  The other way where it opens the lognon then closes  it does not clear the username and password.  I tried closing access and reopening.  It still keeps the username in the field and asterisks in the password screen.  

What I like is code for blanking out those fields.

Nathan Shepard

Option Compare Database
Option Explicit
Private Sub CancelBtn_Click()
DoCmd.Quit
End Sub

Private Sub LogOnBtn_Click()
Dim PW As String
If IsNull(UserName) Then
          MsgBox "Invalid UserName"
          Exit Sub
End If

If IsNull(Password) Then
MsgBox "Invalid PassWord"
Exit Sub
End If
PW = Nz(DLookup("PassWord", "LogOnT", "UserName=""" & UserName & """"), "")
'                                                  PW = Nz(DLookup("PassWord", "LogOnT" , "UserName=""" & UserName & """"), "")



If PW = Password Then
    
    DoCmd.Close acForm, Me.Name, acSaveYes
     DoCmd.OpenForm "MasterMenuF"
    Else
    MsgBox "Invalid Logon"
    End If
    End Sub
  
Nathan Shepard OP 
      
14 months ago

Scott Axton 
          
14 months ago
Nathan in design mode -
Make sure your text boxes in the form are unbound for both the Username and the Password.
Second, did you set a default value for either of those?  (property sheet:  Data tab > Default Value)
If so clear that line.  
Otherwise the form itself isn't bound to anything and the fields are not bound to anything you should not be having anything automatically load.  
Nathan Shepard OP 
      
14 months ago
Scott
I will put some money in my paypal account.  It takes about four days for the transfer.  By the way.  I followed your instructions and it works great.  Thank you.

If any other moderator remembers they gave me assistance.  send me an email at [email protected].  I will see to it you are paid.  Jeff
Scott Axton 
          
14 months ago
Super deal!  So glad that worked out for you.  I'm glad to help.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in User Level Security.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 12/13/2024 6:00:42 PM. PLT: 1s