2010 Web Database Cmd Btn Password to Open Form

steve21nj

Registered User.
Local time
Today, 03:50
Joined
Sep 11, 2012
Messages
260
I am working with a 2010 Web Database that I recently took over. A request came in to see if I could password protect a certain form from opening with the appropriate password entered in an input box.

This wouldn’t be a problem in VBA, however I am not exactly sure how to implement this in a web database with the use of macros. Any suggestions on how to get it started?

I thought I could use the where condition on the open form

Code:
Open Form
[SIZE=3][FONT=Calibri]Form Name ContactDetails[/FONT][/SIZE]
[SIZE=3][FONT=Calibri]Where Condition = [name of command]=”my password”[/FONT][/SIZE]
[SIZE=3][FONT=Calibri]Data Mode Add[/FONT][/SIZE]
[SIZE=3][FONT=Calibri]Window Mode Dialog[/FONT][/SIZE]
 

Attachments

  • 1.PNG
    1.PNG
    38.4 KB · Views: 216
I don't think you'd want the wherecondition. In previous versions, I think you'd use a Condition, which you'd get at by clicking on the Conditions icon in the ribbon. If you can't find it, I have 2010 on a VM I can start up.
 
If you could, I am not sure where you are referring to. I have never played with a web database before and find it rather frustrating so far!
 
The picture shows a basic way of doing this. I don't use macros, so there are probably others.
 

Attachments

  • Condition.jpg
    Condition.jpg
    22.8 KB · Views: 261
Thank you, I was able to fit that in my current macro outlined in the attachment "good".

Working with the same text box, I was attempting to enable a navigation button. I have attached 3 additional attachments [help1, help2, and help3] outlined below. Is it possible to activate a navigation button with what i have? What would be the control name of that tab?

help1
Enabled - No
Datasheet is not enabled picture

help2
attempting to enable tab
navigation button name = nvbDatasheet
After update marco picture

help3
error message after typing test1 and tabbing picture
 

Attachments

  • good.PNG
    good.PNG
    24.8 KB · Views: 219
  • help1.PNG
    help1.PNG
    8.6 KB · Views: 194
  • help2.PNG
    help2.PNG
    5.8 KB · Views: 202
  • help3.PNG
    help3.PNG
    30.3 KB · Views: 190
Can you post a db to play with? I haven't worked with a web db since they first came out, and I decided it didn't really fit my needs.
 
pbaldy,

I have attached a sample database. I didn't create it, but was asked if the password features could be added.

The password box is next to Edit Details.

Thank you!
 

Attachments

pbaldy, did you get a chance to look at the sample data?
 
I looked at it, but haven't found how to enable the nav button yet.
 
Hi,

You can use the SetProperty macro action to enable a navigation button. Enter the navigation button control name for the Control Name argument.
Enter Enabled for the Property argument.
Enter True for the Value argument.

--------------------
Jeff Conrad - Access Junkie - MVP Alumnus
SDET II - Access Test Team - Microsoft Corporation

Author - Microsoft Access 2013 Inside Out (coming soon)
Author - Microsoft Access 2010 Inside Out
Co-author - Microsoft Office Access 2007 Inside Out
Access 2007/2010 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------
 
Thank you for the response.

I am still producing an error outlined in my attachments.

10.png shows the macro
11.png shows that the control name doesn't exist
12.png shows the macro single step
13.png shows the control name that I am attempting to refer too.

Any ideas on what I am doing wrong?
 

Attachments

  • 10.PNG
    10.PNG
    28.7 KB · Views: 204
  • 11.PNG
    11.PNG
    65 KB · Views: 204
  • 12.PNG
    12.PNG
    92.1 KB · Views: 198
  • 13.PNG
    13.PNG
    66.2 KB · Views: 188
Hi,

The only way to change the enabled state of a navigation button in a web form is using the SetProperty action as you have done.

However, based on your screenshots, it appears you are trying to change the state of a navigation button from within a subform which you cannot do. The SetProperty will only work against controls that are on the form from which it is called. Your text box is actually in a subform that is being displayed within the subform container of the navigation control on the main form. Does that make sense?

You're either going to have to move that text box off the subform onto the main form where the navigation control is hosted, or use a different approach to achieve your goal. (There are other approaches.)

--------------------
Jeff Conrad - Access Junkie - MVP Alumnus
SDET II - Access Test Team - Microsoft Corporation

Author - Microsoft Access 2013 Inside Out (coming soon)
Author - Microsoft Access 2010 Inside Out
Co-author - Microsoft Office Access 2007 Inside Out
Access 2007/2010 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
 
Hi,

That's nice to hear you have your problem solved.
Glad we could help.
Good luck with your project.

If you don't mind me asking, what type of web database are you building/modifying here? What are you tracking in the database? How many users are using the web database (or plan to use)? Are you using Office 365 or your own internal SharePoint server?

Thanks,

--------------------
Jeff Conrad - Access Junkie - MVP Alumnus
SDET II - Access Test Team - Microsoft Corporation

Author - Microsoft Access 2013 Inside Out (coming soon)
Author - Microsoft Access 2010 Inside Out
Co-author - Microsoft Office Access 2007 Inside Out
Access 2007/2010 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------
 
I believe they started the database based on a Access 2010 web template that tracks employees contact info. The program is shared over an exisiting windows enviornment network without a sharepoint sever. The program is used more for viewing information than gathering. At most, maybe 5 people would access the program at any given time.

Our company has a sharepoint site, but IDK if they would allow an application such as MS Access to be stored on there. It is mostly for documents. To be honest, I do not know enough about the web based access to make it available for users in different states. Any suggestions? I'd like to build a new one from scratch that tracks employees, trainings, certifications, shifts, etc. But I feel the web version is very limited, although it would be nice to have a centeralized database that stores all the information of employees in different sites, rather than having multiple databases for each site.
 
Hi,

You actually have several options available to you.

To start though I need you to back up first. I might have assumed incorrectly in my first assesment based on what you provided that this web database has already been published to a SharePoint server. You said this is a web database that started from a 2010 web databse template.

Is this web database published to a SharePoint server running Access Services or are you using this web database completely within Access client and never been published to a SharePoint server? Essentially I'd like to know if you've only ever used this web database as a local database or if the database has been published to a SharePoint server.

Can you let me know your current setup?

Thanks,

--------------------
Jeff Conrad - Access Junkie - MVP Alumnus
SDET II - Access Test Team - Microsoft Corporation

Author - Microsoft Access 2013 Inside Out (coming soon)
Author - Microsoft Access 2010 Inside Out
Co-author - Microsoft Office Access 2007 Inside Out
Access 2007/2010 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------
 

Users who are viewing this thread

Back
Top Bottom