Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Cmd Button
Giovanni Miranda 
    
4 years ago
Hello,

I've implemented one of your VBA Codes into my Database and it works perfectly!  It is the one that once information is entered in one Field (txtbox1) it makes the other Field (txtbox2) disappear.

What I'd like to do is also create a Cmd Button to make it disappear again without having to re-enter any information in the first txtbox1.  If I wanted to change the image I click the "btnVisible" button change the information of the image in ProfilePicture

But, as you know I have to re-enter information in "txtbox1" even if it's just one letter and click out or tab out before "txtbox2" will disappear again.

Is there any way a second Cmd Button be created to make "txtbox2" hide - disappear without having to re-enter data in "txtbox1"?

Any help would be greately appreciated...
Kevin Robertson  @Reply  
          
4 years ago
What conditions need to be met to determine whether the field is visible or not?

To keep things simple though, if all you want is a Button to hide the field:
TextBoxName.Visible = False

If you are new to VBA, I recommend Intro to VBA.

These should also prove useful:
Command Buttons
AfterUpdate
On Current Event
If Then
Giovanni Miranda OP  @Reply  
    
4 years ago

Giovanni Miranda OP  @Reply  
    
4 years ago
I have a button to hide the field already, what I'm asking is another button once I've changed the information - picture, that is. Because what the current code does is let me see the field again and allow me to change the path of the picture.  Once I've changed the path or filename I have to go back to the "txtbox1" which already has text in it and re-enter the text or even just one of the letters of the text and tab out before "txtbox2" disappears.

What I wanted to know is there a way I could create "another" Cmd Button that allows me to make it disappear again without having to enter anything in "txtbox1" again...?  Does that make sense?

This is the code I already have for the btnVisible Cmd Button:

Private Sub Favorite__Yes___No__AfterUpdate()

    Me.ProfilePicture.Visible = False ' Field=Favorite
    
End Sub

Private Sub ImageLocationVisible_Click() ' ControlBox=Button you assign

    Me.ProfilePicture.Visible = True

End Sub
Giovanni Miranda OP  @Reply  
    
4 years ago
Got what your saying!!  Lol, it's early where I'm at thanks for your help!  That's why you shouldn't program after 10pm!!!!
Kevin Robertson  @Reply  
          
4 years ago
Just add another button to the form and put the code in the Click event of the button.

ProfilePicture.Visible = False
Giovanni Miranda OP  @Reply  
    
4 years ago
Thank you, that helped out immensely...I created another button with that "click..." cmd and it worked perfectly!  Thanks again!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

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 10:10:54 AM. PLT: 1s