473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

access 2010 username and passwords

hi!

i realize that access 2010 does not have the username and password function built into it, so i am trying to build it into my db.

i have a "login form" with text fields titled username and password. i also have a table containing all usernames and passwords. i also have a query that references the table with criteria set to match the form text box data with the table data. this "verification" occurs on click on a button on the fowm. i keep getting stuck on my favorite automation object error and my macro stops after the query opens to display the matching username and password enter.

my macro process continues with an if statement that says if [Text0]=[LOGINS Query]![Username] And [Text4]=[LOGINS Query]![password]then close all windows and then open my "interface" form.

does that all make sense?

im not opposed to going a different route with this, i just need to be able to create username and password protection that i can eventually link to a timestamping function i have writted. part of this "login process" needs to include some way to indicate to the database and all relevant forms or tables, who exactly is using the database. not sure how to get around the multiple users issue.

thoughts anyone?

all help is greatly appreciated.

thanks!

john!
Sep 14 '11 #1
3 6039
NeoPa
32,556 Expert Mod 16PB
First look at When Posting (VBA or SQL) Code. Your example is neither posted in CODE tags nor has been copied across accurately from your code.

The code won't work anyway, as you are trying to access a field in a query (if the name is anything to go by) rather than a valid object you actually have access to. You will need to use DLookup() instead. All the information you need on how to use that can be found by using Context-Sensitive Help.

I'm sorry I can't help much as I'm rushing off for a week+ away from home and computer, but an alternative approach might be to utilise the logged on name of the user. This can be found by using Function to Return UserName (NT Login) of Current User.

As a parting comment, never use passwords in plain text. Store them, and compare them, using a conversion/encryption function of some kind. Remember, security, like any chain, is only as strong as its weakest link. You don't ever want anyone to find out that your work was the link where the chain broke ;-)
Sep 14 '11 #2
patjones
931 Expert 512MB
As NeoPa suggests, first definitely make sure that your passwords are encrypted. There are a couple of good algorithms out there that I've used and which are good enough for this purpose. Try doing a search for MD5 and/or SHA encryption. The latter is a little more up to date but MD5 could work perfectly well also.

I don't use macros, so I would embed the code that you need in the On Click event for the log in command button.

If you want to continue along these lines let me know and we'll hash it out.

Pat
Sep 14 '11 #3
NeoPa
32,556 Expert Mod 16PB
You may find the following links hosted here on Bytes to be particularly helpful for that :
AES Encryption Algorithm for VBA and VBScript
RC4 Encryption Algorithm for VBA and VBScript
SHA2 Cryptographic Hash Algorithm for VBA and VBScript
Sep 14 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: phill86 | last post by:
Hi, I have an access 2010 database that I want to convert to an SQL Server database and I need to know if the data macros in access will still work in the SQL database or will i have to create...
5
by: jaad | last post by:
Hello, I have a database that was written in access 2007 on my pc. I wanted to work off site with the database so I uploaded it onto my laptop which is loaded with access 2010 beta. When I...
2
by: sierra7 | last post by:
It seems Access 2010 is associating an 'input mask' or field type with a combo box when a form is opened, even though there is no Format setting on the control. I have a form which has been...
2
by: dougancil | last post by:
I have a user who had deleted some records from a database today using Access 2010. They have an ID field that's autonumbered. They have No Duplicates allowed. When they created a new record today,...
0
by: Andolino | last post by:
In Access 2010 I get a Write Conflict error - "This record has been changed by another user..." In Access 2007 this Code is working - why? Private Sub Form_BeforeUpdate(Cancel As Integer) Dim...
1
by: Alan Yim | last post by:
Hi folks, My company recently upgraded our Office suite from 2003 to 2010. The problem in particular is with an Access database that was originally designed in Access 2003. The code in question...
5
by: colsoft | last post by:
I am using Access 2010. Am generating reports for the records, one record per page. The records on the even pages have a light black background shading which appears when am printing. Please i need...
2
by: Bill Boord | last post by:
I need to be able to shut off the AutoCorrect "feature" within Access 2010 code. I have utilized Application.SetOption with method strings for other startup requirements, but I cannot seem to find a...
1
dsatino
by: dsatino | last post by:
I have numerous applications built in Access 2000/2003 that all use ODBCdirect workspaces to access various non-Access databases. Unfortunately, ODBCdirect is 'no longer supported'in Access 2010 and...
1
by: Music Man | last post by:
Greetings All: I built a database in Microsoft SQL Server 2000 and used Microsoft Access 2010 as the front end. The database is used to keep track of "issues" that rise out of my employment. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.