By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,569 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,569 IT Pros & Developers. It's quick & easy.

Mircrosoft Access: Opening a sub form with a command button

P: 10
I have created a form and want to open the sub form with an on click command button. Is this possible? The only way I can view the subform is to have it embedded into the form. I want to have it hidden and open with the click of a command button embedded inside of the form itself
Oct 4 '07 #1
Share this Question
Share on Google+
9 Replies

Expert 5K+
P: 8,127
Question moved to Acess forum.
Oct 5 '07 #2

Expert Mod 15k+
P: 31,476
Thanks Debas :)

To show and hide the subform, set the .Visible property of the SubForm item in your code.
Oct 5 '07 #3

P: 10

Thanks for the update. I am now able to hide the subform, but I am still having trouble opening (viewing) the hidden subform with the use of a "open form" command button? Is this possible?
Oct 8 '07 #4

Expert Mod 15k+
P: 31,476
It's going to be difficult to get a form to show on the clicking of a command button on that form if the form starts off invisible.
Can you let us know if this is what you're thinking of or if there's other forms involved. If so, what and where are they (Names etc).
Oct 10 '07 #5

P: 10
Well I have a lot of fields that will not fit on one page of the form. I am attempting to have some of the fields listed on the first page of the form, and then click a command button that opens the remaining fields on a second page (sub form)? Maybe I can set the properties of the subform and have it built in to page one of the form and click a button to maximize the subform (drop down list)?

Oct 10 '07 #6

Expert Mod 15k+
P: 31,476
Have you considered using tabbed pages on your form?
That is the usual way to handle situations of this nature.
Oct 11 '07 #7

P: 6
You may also extend the length of the details section of the form to include all controls you need, use a page break control at the end of the visible area in the form margins,and finaly include buttons to move from one page to the next.
DoCmd.GoToPage 2
DoCmd.GoToPage 1
I'm using this and is very easy and confortable.
Oct 11 '07 #8

P: 10
Thank you for all of your help
Oct 11 '07 #9

Expert Mod 15k+
P: 31,476
No problems. I hope it helped.
Welcome to TheScripts :)
Oct 12 '07 #10

Post your reply

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