linking and opening forms

bbulla

I'd rather be golfing
Local time
Today, 03:43
Joined
Feb 11, 2005
Messages
101
I currently have on form with many subforms on it. The main form is linked to the subforms using a field "LocID". Since not all subforms need to be used, what I want to do is to add buttons to pop up a form if the user wants to add data. (This will not make the main form so large and ugly)

I seem to be able to code the button to open the proper form, and can add data, but the link field (LodID) is not carrying over to the form just opened. This form will only be for adding new data.

How can I get the LocID from the main form and into the new form that opens?

Also, is there a way to keep the main form maximized while opening the new form? Both forms go into 'restore' when I click on the button?

Thanks
 
Subforms

You can put the subforms on the main form with the master/child fields linked correctly (they can be on top of each other and make them visible or invisible as needed.

For instance: use a command button to make subform1 invisible and at the same time make subform 2 visible:

Me.subform1.Visible = False
Me.subform2.Visible = True

And to make a certain subform visible when opening the main form apply the code in the On Open Event of the Main Form.
 
Yeah, that would work and would be a relatively easy solution, but not really a solution to the problem of having one really massive input form. Even though the subforms won't be visible until you hit the button, you still have to design the main form to fit everything in.

Ideally, a new form would appear for each button the user picks, and all forms that open would be linked to the main form by LocID.
 

Users who are viewing this thread

Back
Top Bottom