Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8453293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:44:00+00:00 2026-06-10T11:44:00+00:00

I currently have a MySQL database that stores, among other things, a users name

  • 0

I currently have a MySQL database that stores, among other things, a users name and password for login. I have a MS Access 2010 front end with a login screen that I built that asks for the user password and name and compares it to the MySQL user name and password and if they match it will open another MS Access form. I would now like to store the passwords in hash sha1 in the MySQL database but I don’t know how to write my vbscript so that it will take the password that the user typed in at the MS Access form, convert it to hash sha1 and compare it to what is already in the MySQL database for that particular user. I’ve included the vbscript that I used when I wasn’t using hash. Any assitance would be greatly appreciated.

'compares username and password to a query and will either open another form OR display an incorrect password message.
Dim dbs As Database
Dim rstUserPwd As Recordset
Dim bFoundMatch As Boolean

Set dbs = CurrentDb

'query that has all the usernames and password
Set rstUserPwd = dbs.OpenRecordset("qryUserPwd")

bFoundMatch = False

If rstUserPwd.RecordCount > 0 Then
rstUserPwd.MoveFirst

'name of the access form is called 'Login'    
Do While rstUserPwd.EOF = False
If rstUserPwd![UserName] = Form_Login.txtusername.Value And rstUserPwd![Password] = Form_Login.txtpassword.Value Then
bFoundMatch = True
        Exit Do
End If
    rstUserPwd.MoveNext
Loop

End If
'open admin form
If bFoundMatch = True
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "admin"
Else
MsgBox "Incorrect User Name or Password"
End If
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:44:01+00:00Added an answer on June 10, 2026 at 11:44 am

    Mysql has it’s own sha1 function (and others encryptions), so you can do things like “SELECT permission FROM customers WHERE sha1(key) = sha1(‘”&entered_key&”‘)”
    See http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html#function_sha1
    So your vba itself doesn’t need a sha algorithm.

    You could use a vba/vbscript sha algorithm if you really want, if you google around you will finbd several, eg like this one http://bytes.com/topic/access/insights/906938-sha2-cryptographic-hash-algorithm-vba-vbscript

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have an online web hosted MySQL database with HostGator.com that currently stores
I'm trying to normalize a mysql database.... I currently have a table that contains
I have an application that currently stores timestamps in MySQL DATETIME and TIMESTAMP values.
I currently have a MySQL database which I was hoping to use to store
I currently have a very simple MySQL database (articlesDB) with 1 table (articles) and
I have a MYSQL database. Text is currently stored in charset latin1 , collation
Currently i'm writing a JDBC application to manage a MySQL database. I have the
I have a MySQL database called People which contains the following schema <id,name,foodchoice1,foodchoice2> .
I have developed a grails application that stores a great deal of information. Currently,
I have been working on a web project that stores locations for users. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.