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

Home Posts Topics Members FAQ

VB - Input Box Password Help

2 New Member
I have successfully created a password input box on a command button however when you type in the password it is all shown until you press enter. Is there any way that i can change the below code so that when typing in my password it changes it to a *?? for example i type my first letter in "s" then when i enter the next letter in the previous one changes to *??

Thanks in advance.
Expand|Select|Wrap|Line Numbers
  1. Private Sub othrps_Click()
  2. 'Attached to On Click event of othrps
  3.  
  4.     Dim strPasswd
  5.  
  6.     strPasswd = InputBox("Enter Password", "Restricted Form")
  7.  
  8.     'Check to see if there is any entry made to input box, or if
  9.     'cancel button is pressed. If no entry made then exit sub.
  10.  
  11.     If strPasswd = "" Or strPasswd = Empty Then
  12.         MsgBox "Operation Cancelled", vbInformation, "Required Data"
  13.         Exit Sub
  14.     End If
  15.  
  16.     'If correct password is entered open Employees form
  17.     'If incorrect password entered give message and exit sub
  18.  
  19.     If strPasswd = "Sugar" Then
  20.         DoCmd.OpenForm "frm_other_reports", acNormal
  21.     Else
  22.         MsgBox "Sorry, you do not have the required permission to access this area", _
  23.                vbOKOnly, "Important Information"
  24.         Exit Sub
  25.     End If
  26. End Sub
May 19 '10 #1
3 5076
NeoPa
32,556 Recognized Expert Moderator MVP
Set the Input Mask of the control to Password. No quotes. Just the text.
May 19 '10 #2
missinglinq
3,532 Recognized Expert Specialist
NeoPa, can you do that when using InputBox? I thought you'd have to used a small popup form in place of the InputBox.

Linq ;0)>
May 19 '10 #3
NeoPa
32,556 Recognized Expert Moderator MVP
You're right of course Linq.

I would suggest an alternative of creating a form to get your password from the operator. Forms can be made to be very similar to the InputBox windows if you feel that's required.
May 19 '10 #4

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

Similar topics

0
1973
by: Ray Lavelle | last post by:
I'm new to VB .NET. In the past when creating an application, if I had an input form I would just call the set and get methods on the object that mapped to my database table in order to store and...
1
1669
by: Emaga75 | last post by:
In dotNET windows_based deployment project user interface form, How to mask a textbox for input password? Thanks.
6
8864
by: gman_00ph | last post by:
Private Sub Form_Load() With Data1 .DatabaseName = App.Path + "\mydbase.mdb" .RecordSource = "Select * from usertable" .Refresh End With End Sub...
4
1380
by: Hena | last post by:
Hi Any ideas how to use the repair option for a corrupted MS Access 2000 database which are on a network drive and used by several users, that has been password protected? On opening the...
0
936
by: Napalm | last post by:
Hi there, As some of you may have gathered, i am still very new to .Net & was hoping to get some assistance. I'm trying to add an expression to my Windows Application that will confirm if a...
1
1241
momotaro
by: momotaro | last post by:
i m looking to have the date of the computer used as an input in a program can u help? thx!!
3
2742
by: vishnu | last post by:
Hi, I am using HTML input file button to browse the file and just am updating the file name in sql server table.But now i want to browse the file from the remote file share path ..How can i...
5
2176
by: xiang | last post by:
Please help me with my vbs... currently i set a inputbox to type in password to appear "***" but it just cannot become ****** .. instead with appear its characters. is there any ways that can let me...
3
1583
by: yuzusakura15 | last post by:
Pleas help I need to make what the user inputs on the password textbox appear as * Please reply
2
1531
by: poreko | last post by:
I am trying to validate the inputs of a form using javascript. The validation is working but the form is not been submitted after the inputs have been checked. I have been unable to find any error....
0
7099
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
7175
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...
1
6842
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
7319
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...
1
4864
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...
0
4559
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
3069
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
1378
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 ...
0
262
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...

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.