473,657 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

access 2010 username and passwords

1 New Member
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 "verificati on" 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 6062
NeoPa
32,568 Recognized Expert Moderator MVP
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 Recognized Expert Contributor
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,568 Recognized Expert Moderator MVP
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
4574
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 triggers in the SQL Sever database Many Thanks Phill
5
12415
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 finished working with the database and return it to my pc(which has access 2007) I can't get it open because Access say that the file is not the right format. Does anyone have a way to work around this compatibility problem? So you know I...
2
6703
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 running OK for years in Access 2003; it adds an item selected from an inventory listing to either an existing Sales Order or Purchase Order. For historic reasons Purchase orders are alphanumeric and Sales orders are numeric (long integer). The RowSource...
2
7187
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, it was recreating numbers that had already been assigned but deleted. I've read a couple of articles about resetting the autonumber in Access, but I'm wondering if this is the only way to really fix this issue? Has anyone else came up with a work...
0
1707
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 dbs As DAO.Database, rst As DAO.Recordset, strCriteria As Variant Set dbs = CurrentDb Set rst = dbs.OpenRecordset("Artikel", dbOpenDynaset) strCriteria = " =" & Me.
1
5246
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 used work in 2003 (see below code). Private Sub engSave_Click() Dim strSql3 As String 'Archive order number and cost data for engine.
5
49025
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 help on how i can remove those background shading.
2
7316
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 correct method string to turn off the text replace "feature." I am not talking about the "Track Name AutoCorrect Info" method, but rather the method that corresponds to the checkbox if one were to enter Access 2010 and click File, Options,...
1
8481
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 when my associates get new PC's, the applications fail. The error message says to switch from DAO to ADO. This is a little curious since ADO is dying/dead as well. I'm hoping someone can add a little insight/best practice to my situation.
1
3428
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. I've been there a long time and now feel the need to start documenting certain occurances. I have 4 tables, one of which is a table called fileattachments. I'm storing the path to the files in this table and the actual files are stored in a directory...
0
8382
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8717
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8498
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8600
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1600
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.