Hello, I have a simple question.
I would like to restrict the opening of a form using a password. My
database it's already quite secure therefore it's just an additional
way to avoid users to intrude in this form.
On the OnLoad event I have added this code:
Dim strInputBox As String, bytChoice As Byte
InputPoint:
strInputBox = InputBox("Pleas e input the password.", "Password
Required - Restricted Area! ")
If Len(strInputBox ) 0 Then
If strInputBox <"***" Then
bytChoice = MsgBox("Wrong password" & vbNewLine & vbNewLine & "Do
you want to try another?", vbExclamation + vbYesNo, "Warning")
If bytChoice = vbYes Then
GoTo InputPoint
End If
Else
DoCmd.OpenForm ("myform")
End If
End If
Something is here not working correctly as whatever option I select
(yes or no) it will open my form.
What I need is that when I select No, it will prompt again to type the
password, while if I click YES, it will open my form.
Thank you for any help. 4 5164
On 3 Oct 2006 07:01:54 -0700, "jpr" <jp***@tin.itwr ote:
Your code should be moved to the Form_Open event and if the password
is not given, set Cancel=True.
-Tom.
>Hello, I have a simple question.
I would like to restrict the opening of a form using a password. My database it's already quite secure therefore it's just an additional way to avoid users to intrude in this form.
On the OnLoad event I have added this code:
Dim strInputBox As String, bytChoice As Byte InputPoint:
strInputBox = InputBox("Pleas e input the password.", "Password Required - Restricted Area! ")
If Len(strInputBox ) 0 Then
If strInputBox <"***" Then
bytChoice = MsgBox("Wrong password" & vbNewLine & vbNewLine & "Do you want to try another?", vbExclamation + vbYesNo, "Warning")
If bytChoice = vbYes Then
GoTo InputPoint
End If
Else
DoCmd.OpenForm ("myform")
End If
End If
Something is here not working correctly as whatever option I select (yes or no) it will open my form. What I need is that when I select No, it will prompt again to type the password, while if I click YES, it will open my form.
Thank you for any help.
thanks. but where should I add the cancel true?
Dim strInputBox As String, bytChoice As Byte
InputPoint:
strInputBox = InputBox("Pleas e input the password.", "Password
Required - Restricted Area! ")
If Len(strInputBox ) 0 Then
If strInputBox <"***" Then
bytChoice = MsgBox("Wrong password" & vbNewLine & vbNewLine & "Do
you want to try another?", vbExclamation + vbYesNo, "Warning")
If bytChoice = vbYes Then
GoTo InputPoint
End If
Else
DoCmd.OpenForm ("myform")
End If
End If
Something is here not working correctly as whatever option I select
(yes or no) it will open my form.
What I need is that when I select No, it will prompt again to type the
password, while if I click YES, it will open my form.
Thank you for any help.
On 3 Oct 2006 07:13:32 -0700, "jpr" <jp***@tin.itwr ote:
Pseudo-code:
if UserWantsAnothe rTry then
Goto InputPoint
else
'User wants to quit
Cancel=True
end if
-Tom.
>thanks. but where should I add the cancel true?
>Dim strInputBox As String, bytChoice As Byte InputPoint:
strInputBox = InputBox("Pleas e input the password.", "Password Required - Restricted Area! ")
If Len(strInputBox ) 0 Then
If strInputBox <"***" Then
bytChoice = MsgBox("Wrong password" & vbNewLine & vbNewLine & "Do you want to try another?", vbExclamation + vbYesNo, "Warning")
If bytChoice = vbYes Then
GoTo InputPoint
End If
Else
DoCmd.OpenForm ("myform")
End If
End If
Something is here not working correctly as whatever option I select (yes or no) it will open my form. What I need is that when I select No, it will prompt again to type the password, while if I click YES, it will open my form.
Thank you for any help.
OK, its' working now. Thanks. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Chris |
last post by:
I have a frontend that has some tables which are linked to a backend.
Now I want to make the backend password protected and when I try to
run it password protected I can't open it. In the first form that
opens in the front end, I added the following to the form_open event:
Dim cnn As ADODB.connection
Set cnn = New ADODB.connection
cnn.Provider = "Microsoft.Jet.OLEDB.4.0"
cnn.Properties("Data Source") = "C:\backend.mdb"
|
by: Whitey |
last post by:
I have a password secured database. After the password is entered the
user has a form that I created that allows them to search the database
and retrieve information.
The problem is that the connection string requires a the database
password even though the user entered it to open the database. How can
I get the password from the system to build the connection string?
Thanks for any help,
Whitey
|
by: Eugene Anthony |
last post by:
Is this method of validation for password and username considered to be
secured. In my previous post I was given a solution that uses command
object and the values are parsed by parameters. But the solution only
worked well for insert and delete, but not select.
<%
if Request.QueryString("Action") = 1 then
username = Trim(request.form("username"))
password = Trim(request.form("password"))
if username <> "" and password <> "" then
|
by: Andrew Murray |
last post by:
I'm a novice at coding and cannot get the script below to work I'm
receiving an Error 500 in the web browser when trying to run this script.
The site is www.murraywebs.com and the link is 'Retrieve Password' under the
logon form. the idea is to submit an email address and the password is
emailed to the user. (a very "basic" but common function of user management
systems).
The script(s) I'm using are based on...
|
by: dan.cawthorne |
last post by:
Hi all,
Need Some Help With A Simple Password Form
What a I Have Is Single Field Table, With One Record In It The Field
is Called table is also called "Password"
which ive created a form that represents this table, so the admin can
change the password if needed at ease.
| |
by: pawan123 |
last post by:
Hi,
I am using VB6 and SQL Server 2000.
I want to design a logon form. In this form, how can I use a Password field to store in encrypted form in tbluser table and how can I compare password text in this table?
Please tell me how I can use encode/decoder algorithm to secure password.
User form coding is as follows :-
|
by: hotflash |
last post by:
Hi All,
I want to creat a script where I will allow user to reset their own password. I have tried different options but don't have any luck. Wonder what I want to do is kinda not valid or not.
ResetLogin.asp (where user will have to enter their username, old password, and new password).
<TR>
<TH ALIGN=LEFT> <FONT FACE="HELVETICA,HELV,ARIAL" SIZE=2> User Name: </FONT></TH>
<TD><INPUT CLASS="bluebox"...
|
by: Mai Le |
last post by:
Hello,
I used Microsoft Access to create a login form with
Name
Password
Access Level Admin and User
I would like to let Admin login and open MRB form and User login then open other form like "test"
Please show me how to do it
Thanks in advance
I had code below
|
by: jerrydigital |
last post by:
Hi,
I am working on a forgotpassword.asp page. I would like the user to enter their email address, and click submit. Upon submit, an email will be sent to the user's email address provided with the "password" they registered with.
I have posted my code below. However, I get an error on line 31:
Message = "You're password is:" & <%=objRS("Password" )%>
The input name="email" on the html form that leads to this asp page.
|
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...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
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,...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |