Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-access > #8970

Re: Enter with Identification in database

From "Phil" <phil@stantonfamily.co.uk>
Newsgroups comp.databases.ms-access
Subject Re: Enter with Identification in database
Date 2014-02-07 11:16 +0000
Organization Aioe.org NNTP Server
Message-ID <ld2fa7$j2$1@speranza.aioe.org> (permalink)
References <e9ec8653-9f44-4e48-8473-4833878f1c84@googlegroups.com> <ld122t$u9c$1@speranza.aioe.org> <fc676924-4aef-441b-8bee-bb1b69150ab6@googlegroups.com> <ld2dns$s1v$1@speranza.aioe.org>

Show all headers | View raw


On 07/02/2014 10:49:26, "Phil" wrote:
> On 07/02/2014 09:28:39, Wiking Derek wrote:
>> thx...
>> End If
>>
>> UserPass = ELookup("UserPassword", "Users", "UserID = " & UserID)
>>
>> If StrComp(UserPass, Userpassword, vbBinaryCompare) = 0 Then
>> Call SelectUser(UserID)
>> DoCmd.Close acForm, Me.Name         ' Upen the menu
>>
>> Me.name is the form that I would open after entering User and psw?
>> ("UserPassword", "Users", "UserID = " & UserID) are this the informations
>> from the table with the users info?
>>
> Dereck
> 
> The line If StrComp(UserPass, Userpassword, vbBinaryCompare) will return a
> 0 if the password is correct, otherwise it will return a +1 or -1. So if
> it returns a 0 you can open whatever form you like, if not, you need to
> display some error message and either go back to entering the password
> again or aborting the login
> 
> So the line DoCmd.Close acForm, Me.Name  should be
> DoCmd.OpenForm "Whatever"
> Remove the line "Call SelectUser(UserID)"
> 
> On your login form you need the UserID (probably a ComboBox) to select who
> is logging in
> 
> The Users table should look like this:-
> UserID     AutoNumber
> UserName    Text   Unique
> UserPassword   Text   Unique
> ...
> 
> Phil
> 
> ---
> This email is free from viruses and malware because avast! Antivirus
> protection is active. http://www.avast.com
> 
> 

Incidently, there is a picture of the Login form at
http://www.flickr.com/photos/philofwaltonspics/

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Enter with Identification in database Wiking Derek <derekwiking@gmail.com> - 2014-02-06 12:23 -0800
  Re: Enter with Identification in database "Phil" <phil@stantonfamily.co.uk> - 2014-02-06 22:24 +0000
    Re: Enter with Identification in database Wiking Derek <derekwiking@gmail.com> - 2014-02-07 01:28 -0800
      Re: Enter with Identification in database "Phil" <phil@stantonfamily.co.uk> - 2014-02-07 10:49 +0000
        Re: Enter with Identification in database "Phil" <phil@stantonfamily.co.uk> - 2014-02-07 11:16 +0000
          Re: Enter with Identification in database Wiking Derek <derekwiking@gmail.com> - 2014-02-15 03:42 -0800
            Re: Enter with Identification in database "Phil" <phil@stantonfamily.co.uk> - 2014-02-15 14:36 +0000

csiph-web