Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Make Form Visible
Carmen Vazquez 
    
4 years ago
I have a MainForm with a SubForm (the subform contains our Main request form) this is the default view when the form open.

The Main Form has 4 buttons, which won't work while any of the forms are open except what's in the main form's view

1. Create New - this would be the default view (when pressed just makes the form visible (for now))
2. Review Estimates - this will make the subform on the main form invisible and open the Review Estimates form
3. View profile - when pressed will open the profile window
4. Quit

When I press button 2 -
the subform on the main form becomes Visible = True and the new form opens

What I want to happen (in addition) is when I close the form that the subform on the main form becomes visible again.

I've tried the following code on all the possible events:

Form_Activate
Form_Current
Form_GotFocus
Me.Cost_Estimate_Form.Visible = True

I also tried to call the form in the Close event of the forms in Button 2 & 3 but it couldn't find the control.  Any help or suggestions appreciated.


Carmen Vazquez OP  @Reply  
    
4 years ago

Carmen Vazquez OP  @Reply  
    
4 years ago

Carmen Vazquez OP  @Reply  
    
4 years ago

Carmen Vazquez OP  @Reply  
    
4 years ago
First picture is how the main form looks when it its opened
Second picture represents the view when button 2 is selected (subform is not visible)
Third picture is what it looks like when the second form is closed and the mainform is in view
Adam Schwanz  @Reply  
           
4 years ago
So button 2 is setting the main form subform visible to false, and then opening another subform? Is that what is happening here?

You should be able to use the on close event on that subform if you're closing it. Should just be able to do

Forms!MainFormName!SubformControlName.Visible=True

Verify you're using the actual NAME of the field, not neccessarily what the subform is called.
Adam Schwanz  @Reply  
           
4 years ago

Carmen Vazquez OP  @Reply  
    
4 years ago
You are correct on your question for button 2.

In the Close event for Button 2's form I did place that code on there but the error is saying that it can't find the control.  The control should actually be the name of the form but that's not finding it.

Forms!CostEstimatingSystem!Cost_Estimate_Request_Form.Visible = True

The error is "Cost Estimating REquests can't find the field 'Cost_Estimate_Request_Form' referred to in your expression"

That is not a field but the actual form, the subform is the control on the main form...
Adam Schwanz  @Reply  
           
4 years ago
What is the name of that control? If you click on the control it should have a name and a source object, and they don't always match up. The Name of the control is what we want to use there. I just want to verify we have that right.
Adam Schwanz  @Reply  
           
4 years ago
If the name is correct, can you upload an image of that form in design view so I can see what's going on behind the scenes there?
Carmen Vazquez OP  @Reply  
    
4 years ago

Carmen Vazquez OP  @Reply  
    
4 years ago

Adam Schwanz  @Reply  
           
4 years ago
With the _ symbols, worth trying to bracket it. Try this first

Forms!CostEstimatingSystem![Cost_Estimate_Request_Form].Visible = True
Carmen Vazquez OP  @Reply  
    
4 years ago
I typed the expression exactly as you and I got the same error saying that it couldn't find the field referred to in my expression
Adam Schwanz  @Reply  
           
4 years ago
Try

Forms!costestimatingsystem![cost_estimate_request_form].form.visible = true

If that doesnt work ill go test it when im at a pc haha. Also spell check that, writing from phone.
Carmen Vazquez OP  @Reply  
    
4 years ago
Still no go....can I send you a cope of the database?
Adam Schwanz  @Reply  
           
4 years ago
I mean if you want to sure. [email protected] probably faster that way
Adam Schwanz  @Reply  
           
4 years ago
Ah simple solution, couldn't tell in the pictures. It's not  Cost_Estimate_Request_Form it's Cost Estimate Request Form

Forms!CostEstimatingSystem![Cost Estimate Request Form].Visible =true
Carmen Vazquez OP  @Reply  
    
4 years ago
That worked perfectly even though it feels like we tried it before....thank you!
Alex Hedley  @Reply  
           
4 years ago
Should have used kebab case for naming things :p
Richard Rost  @Reply  
           
4 years ago
Gotta watch Access Beginner 1 to learn my naming conventions. NO SPACES! :P

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: 8/7/2026 10:18:22 PM. PLT: 1s