Buttons to Hide and Unhide Forms

R

Ray

Does anyone know of code i can use with a command button to hide and unhide
main and subforms when clicked?

Thanks!
 
J

Jeff Boyce

Ray

I might be missing something...

If you have a form on which you have a button you use to hide/unhide the
form, and if you click the button to hide the form, how will you ever be
able to see the "unhide" button?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
R

Ray

Good Question, I've been stuck on this for the past couple of days trying
different methods to get the same results.

Here's some background... The main form, "Contract Profile", which will open
up when the user first enters the database, has 12 subforms (i.e. Contract
Review, Deliveralbes" etc.) all on one single view form. They are connected
through PK field "ID" and each corresponding field that has the same name. I
see a lot of posts where they say to create a one-to-many relationship but
when i tried this the other fileds did not auto populate. But when i put a
one-to-one relationship with all fields withthe same name it worked fine. So
i don't know if my relatioships are out of whack to begin with.

On the main form you'll see the main form (with its fields) and underneath
you'll see the subforms setup on tabs. The main form will be used to
initiaite the entire process and the subforms will pull key demographic info
such as "Contractor", "Contract Number" etc. from the main form and
auto-populate each of the forms with the same field names. The user can then
enter the subforms and key data into the remianing fields on the subforms as
needed. It works fine but visually it looks cluttered. So i want to either:

Option 1: Be able to set the Main form up on a tab along with the subforms
so the user only sees the forms on the tabs and can easily scroll through to
get the screen they want to view.

Option2: Be able to hide and unhide each form so when any form is selected
(including the main form) the user only sees one form at a time. Sort of like
a menu with options to go to each form but still keep all records
synchronized through their parent child relationship. I see what you are
saying, if i hide the main form the user will not be able to get back to the
main form from the sub forms.

Unfortunately, i have little to no experience with parent/child
relationships and forms/subforms so any help would be greatly appreciated!

Ray
 
J

Jeff Boyce

Ray

It sounds like you have a table structure that is based on your ideas of
what your forms should show. If so, this is backwards when you are working
with a relational database like Access.

Could you provide a bit more description about the underlying data first?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Top