473,405 Members | 2,379 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,405 software developers and data experts.

Input Mask and Simple Login Form

Is there a way to add an input mask in an input box?
Dec 28 '07 #1
7 2616
missinglinq
3,532 Expert 2GB
Afraid not! What you can do is create a small popup form that emulates an Input Box. Then you can do all the things any form can do.

Welcome to TheScripts!

Linq ;0)>
Dec 28 '07 #2
Afraid not! What you can do is create a small popup form that emulates an Input Box. Then you can do all the things any form can do.

Welcome to TheScripts!

Linq ;0)>


That's what I figured, now comes the next question... I have created a popup form (with the text field input mask set to password) and I have two command buttons on it. One cancels and closes the form and I want the other one to verify that the password is correct, opening the administrator form. I know I need to write the code but can't figure it out. Any ideas? I'm sure it's simple, I'm just new. Thanks!
Dec 28 '07 #3
Minion
108 Expert 100+
That's what I figured, now comes the next question... I have created a popup form (with the text field input mask set to password) and I have two command buttons on it. One cancels and closes the form and I want the other one to verify that the password is correct, opening the administrator form. I know I need to write the code but can't figure it out. Any ideas? I'm sure it's simple, I'm just new. Thanks!
There are several ways to go about this and I'm sure you'll get a couple example in the following posts. However, first we need to know a few things.
1. Is the password stored as variable or in a table?
2. Is the password associated with a particular user?
3. Are you planning on using any more encryption beyond the input mask?
4. Do you want to limit the number of attempts?
Of course there are more, but this should allow for a basic example to be drawn up. I think I have some existing code in a project that will work for this (it's a admin panel of my own) that I will share as soon as I know the parameters of the question.

Keep us up to date.

- Minion -
Dec 28 '07 #4
The password is stored in a table and not associated with a certain user. It's just a simple password that will allow me to access the form in order to edit the records. The input mask is just so no one can see what's entered and there is no need to limit the number of attempts. All I'd like is that when the password is entered correctly the command button, when clicked, will verify the password and if it's correct open the form. It sounds simple but I'm clueless when it comes to writing code... i.e. it's not in the VBA for Dummies book! Thanks for any help you can offer.
Dec 30 '07 #5
missinglinq
3,532 Expert 2GB
Assuming:

2 buttons, CancelButton and SubmitButton

1 textbox, PasswordTextBox

1 table, PasswordTable

1 field in PasswordTable named AdminPassword (text datatype)

1 form, AdminForm

On your login form:

Expand|Select|Wrap|Line Numbers
  1. Private Sub CancelButton_Click()
  2.   DoCmd.Close
  3. End Sub
  4.  
  5. Private Sub SubmitButton_Click()
  6.  
  7. If DLookup("AdminPassword", "PasswordTable") = Me.PasswordTextBox Then
  8.   DoCmd.Close
  9.   DoCmd.OpenForm "AdminForm"
  10. Else
  11.   MsgBox "Incorrect Password! Try again!"
  12.   PasswordTextBox.SetFocus
  13.   Me.PasswordTextBox = ""
  14. End If
  15.  
  16. End Sub
Linq ;0)>
Dec 30 '07 #6
Worked great! Thanks again for all the help. I'm sure it was rather obvious, but a huge help to a beginner!
Dec 31 '07 #7
missinglinq
3,532 Expert 2GB
Glad we could help!

Linq ;0)>
Jan 1 '08 #8

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

Similar topics

2
by: Ellen Manning | last post by:
I've got an A2K database with a link to a table in another A2K database. This linked table contains SSN formatted with the SSN input mask. I'm trying to use a dlookup using this linked table. ...
1
by: Miranda Evans | last post by:
In my application, a text box control resides in a form. The text box control is unbound, but--assuming all edits are passed when the user click a command button on the form--the contents of the...
9
by: Paul | last post by:
hi, is there an input mask i could use on a report to do the following: (1) if i enter "THISISATEST" on my form, i want the text box on my report to display: "T H I S I S A T E S T". (2) if...
2
by: johnp | last post by:
Hi, Our Tech department updated users to Office 2003 this week. Now the input mask in one of the applications is showing up as: (###) ###-### The input mask wizard works correctly when I...
7
by: F. Michael Miller | last post by:
I have a db with Access front end, sql back, linked tables. I need to be able to change input masks at the table level in code. Any ideas? Thanks!
1
by: Jon Peck | last post by:
I'm largely self-taught (so hardly an expert) in Access 2002. I'm wondering if it's possible to have a conditional input mask on a field in a form. My database keeps track of people who register...
5
by: mtgrizzly52 | last post by:
First thing, because of you all and this web site, I am building a first class time saving database for my fellow workers to use. My really dumb questions is this. I have a control in a subform...
7
desklamp
by: desklamp | last post by:
I'm a total Access newbie, please bear with me! Using Win2K/Access 2003. I'm trying to create a table in which I can store IP addresses and other information. According to Microsoft, there is no...
1
nathj
by: nathj | last post by:
Hi, I'm surrently struggling with something I'm certain should be very simple. I'm working on a new web application that requires every user to login before they do anything else. This means...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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
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...

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.