Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Show/Hide Buttons    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Main Menu Form
Glenn Kaufman 
     
2 months ago
I tried this and the visible = True or False with an If/Then IsInGroup dlookup. On my main menu form after login runs. I can run the same If/Then when the user clicks the button to check if they are allowed to open the form that the button opens. That works to either allow or deny the user based on their groupXuser role dlookup. I would like to hide the buttons on form open if the user is not allowed to access those button functions. I was also able to do just what I am trying in ASP on the web interface of the same back end database.
Donald Blackwell  @Reply  
       
2 months ago
Trying to understand that... If I got it right, you have a menu form that has a button to open a form but if the user doesn't have permission, it won't open. What you want is for the button to not even be visible if they don't have permission to access the resource.

If that's the case, yes, you can do it. Just put code in the form's onload, onopen, or oncurrent event that validates the user then hides shows the form. Something like:

Private Sub Form_Current()

     If UserAuthorized Then
          BUTTON.Visible = True
     Else
          BUTTON.Visible = False
     End If

End Sub


Replace UserAuthorized with whatever code you're using to validate the user to say they can open the form and, of course, replace BUTTONNAME with the actual name of your button.

If your Authorization test returns a boolean value, you can reduce it to one line of code such as:

Private Sub Form_Current()

     BUTTON.Visible = UserAuthorized

End Sub

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Show/Hide Buttons.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 12:54:41 PM. PLT: 0s