473,511 Members | 15,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Security to a command button in a form

1 New Member
Hi Guys.........Help Please
I'm trying to add a password to limit access to a command button called"Confidential Information"

Mucho regardo
Sep 13 '06 #1
1 2126
MMcCarthy
14,534 Recognized Expert Moderator MVP
In the On Click event of the button put the following:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim pswd As String
  3.     Set pswd = "anythingyouwant"
  4.     If pswd = InputBox("Enter Password", "Password Required") Then
  5.         'Your Code Here
  6.     Else
  7.         MsgBox "You don't have permission to access this ares", vbOKOnly
  8.         Exit Sub
  9.     End If
  10.  
  11.  
  12.  
Hi Guys.........Help Please
I'm trying to add a password to limit access to a command button called"Confidential Information"

Mucho regardo
Sep 13 '06 #2

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

Similar topics

13
4734
by: Samantha Smit | last post by:
Hi, I am trying to create a simple asp page that has one command button that updates a database. The URL of the page is like this: http://MyServer.com/Update.asp?UserName=Tom My asp code is...
7
2595
by: PaulThomas | last post by:
I am fighting with XP-Pro and VS.Net trying to allow some of the pages in my application to be accessable by 'all' I am using <authentication mode="Forms" /> and if I Login - everything works...
1
2338
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Before we start with our sample app we need to view the security configuration files on the machine. You will find them under <drive>\WInNT\Microsoft.NET\FrameWork\<version>\Config ...
2
9261
by: Chris Bolus | last post by:
I'm a teacher using MS Access on an RMConnect 2.4 network. On some workstations both I and my students sometimes get an error message when attempting to insert a command button on a form which...
9
5711
by: Melissa | last post by:
What is the code to delete a command button from a form? Can the code be run from the click event of the button to be deleted? Thanks! Melissa
29
15476
by: Patrick | last post by:
I have the following code, which regardless which works fine and logs to the EventViewer regardless of whether <processModel/> section of machine.config is set to username="SYSTEM" or "machine" ...
0
1241
by: Newbie | last post by:
hi all, i am doing a project which requires me to provide a security login feature. i understand that access has a user level security feature but i could not use it coz i'm tested on my...
14
4945
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
4
4782
by: John Smith | last post by:
I have a continuous form. there is a command button with the following code for the OnClick event: DoCmd.OpenForm "frmPlants", , , "PlantsID =" & Me!PlantsID I click the button and frmPlants...
5
8279
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
0
7430
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
7089
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...
1
5072
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
4743
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
3230
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
3217
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1581
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 ...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
451
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.