473,473 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Custom Log-in screen

Thanks in advance for any clues here. I'm designing a simple user
log-in for a relatively low-security app that I don't want to go
through workgroups, etc. I have a login screen with a combobox to
select a user then a text box for them to put in their password. I have
a separate table set up with just the user name and the passwords as
fields. How can I write code on my log-in form to compare their name
and password entered. DLookup? Any code known that I could put in the
event for pressing the log-in button to accomplish this?
Thanks! Dav

Oct 30 '06 #1
2 1567
"Parasyke" <kr************@yahoo.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
Thanks in advance for any clues here. I'm designing a simple user
log-in for a relatively low-security app that I don't want to go
through workgroups, etc. I have a login screen with a combobox to
select a user then a text box for them to put in their password. I have
a separate table set up with just the user name and the passwords as
fields. How can I write code on my log-in form to compare their name
and password entered. DLookup? Any code known that I could put in the
event for pressing the log-in button to accomplish this?
Thanks! Dav
Assuming your form is bound to the table, something like (untested):

Dim rs as DAO.Recordset, strCriteria as String
strCriteria = "[NameField] = " & Me.cboName
Set rs = Me.RecordsetClone
With rs
.FindFirst strCriteria
If ![PasswordField] = Me.txtPassword Then
'Let them in
Else
'Don't let them in
End If
End With

rs.Close
Set rs = Nothing

You might want to base your combo box on "[NameField]" so that you don't
have to handle the NoMatch situation.

HTH - Keith.
www.keithwilby.com

Oct 30 '06 #2
For low level security apps, I'd recommend just getting the windows
login name. You can create a new module, add the code from here:
http://www.mvps.org/access/api/api0008.htm and then use the
fOSUserName function to determine user name and security on your own
table.
Chris Nebinger
Parasyke wrote:
Thanks in advance for any clues here. I'm designing a simple user
log-in for a relatively low-security app that I don't want to go
through workgroups, etc. I have a login screen with a combobox to
select a user then a text box for them to put in their password. I have
a separate table set up with just the user name and the passwords as
fields. How can I write code on my log-in form to compare their name
and password entered. DLookup? Any code known that I could put in the
event for pressing the log-in button to accomplish this?
Thanks! Dav
Oct 30 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Randy Jackson | last post by:
I'm trying to set up a simple redirect for errors and log them to a custom file. I'm doing this for work on remote servers where I may not have access to their error.log. Anyway, the code I've...
4
by: Paul Woods | last post by:
I'm developing an application that uses a custom 404 page to deliver all of my site's content. However, doing things this way renders IIS's regular log files pretty much useless. Are there any...
6
by: Matt | last post by:
I notice that when you have the defualt setup of 404 error pages the IIS 5.0 log tracks the page the user was trying to get to and the page they where at when they tryed to get to the now missing...
1
by: Victor | last post by:
I am developing a windows service application that uses a custom event. the problem is that the service installer associates the service with application log during the installation process....
0
by: Cuperman | last post by:
Does anyone know of an issue where a Configuration Exception is thrown when "Program Files" is used as part of the initialiseData value within a custom listener? eg: <system.diagnostics> <trace...
2
by: Marauderz | last post by:
OK this just seems to be a common question being asked around here, I've tried Google Grouping the question but I still haven't came up with a solution yet. So here goes... I'm getting the...
0
by: | last post by:
Hi I am having problem with the custom log I have created. When I open the properies page of the log, all the following information were shown "not available" Size Created Modified Accessed
0
by: yousefomar | last post by:
Hi Pros, I have a weird problem here. I am logging from my .NET app to a custom log, but unfortunately, the events are redirected to the Application log. I am sure that I am specifying the log...
3
by: | last post by:
I want to write some custom error messages to a log so that I can read them on the next run of the application and as the user to send them to me. Where the right place to store this log file?...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi all, Can somebody give me a hint why my custom install action does not register event log sources, when I run the MSI package generated by VS2005. The same install action DLL executed via...
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.