Design - Form opening another form in a box

GraemeG

Registered User.
Local time
Today, 14:01
Joined
Jan 22, 2011
Messages
212
Hello.

Refer to pic attached.
I was wondering if i could create a main form which is like the navigation centre. Which then from the buttons on the left will open the related form in the blank blue box to the right side. Is this something like a subform?

The picture probably explains it better.

Thanks
 

Attachments

  • THECORE.image.jpg
    THECORE.image.jpg
    91.7 KB · Views: 116
Use a subform, then use the command buttons to change it.

This is the code you would need, Just replace everything with what you want and assign to the onclick event.

Me.frm.SourceObject = "frm"
Me.frm.LinkChildFields = "C"
Me.frm.LinkMasterFields = "M"

This is just how I would do it, someone might have a better way.
 
You could do it by having a number of unbound Sub-Forms and simply setting their Visible properties to either True or False dependant on the button that is clicked.
 
Yep, subform. The right hand side will be a subform and the buttons can remain on the main form. Put a box control behind the buttons.
 
Thanks for the response people.
How do I enable to the box on the right to recieve a form upon the repsonse from the buttons on the left?
 
Create a form for each subform you want to use and set the SourceObject property of the subform control in code.

So on the Click event of the Internal Survey Form button, the code would look like:
Code:
Me.SubformControlName.SourceObject = "frmInternalSurvey"
where frmInternalSuvery is the name of the Internal Survey form you created earlier.

Link Master/Child Fields properties aren't needed because the main form will be unbound.
 
Create a form for each subform you want to use and set the SourceObject property of the subform control in code.

So on the Click event of the Internal Survey Form button, the code would look like:
Code:
Me.SubformControlName.SourceObject = "frmInternalSurvey"
where frmInternalSuvery is the name of the Internal Survey form you created earlier.

Link Master/Child Fields properties aren't needed because the main form will be unbound.

Excuse my ignorance but I have never used a subform and I am not sure what the sourceobject or subform controls are and where they are. Is this something to do with what will become the Me.SubformControlName?
 
I have managed to enable a subform.
I now just need to figure out how to control it via the the navigaiton pane to the left. (Or allow the controlsource to open different forms)
Any assistance on this one please?
 

Attachments

  • THECORE.image2.jpg
    THECORE.image2.jpg
    99.1 KB · Views: 111
You only need one subform control. Delete what is in the Source Object, Link Master Fields and Link Child Fields properties of the subform control.

Then re-read what I wrote in post #6.
 
You only need one subform control. Delete what is in the Source Object, Link Master Fields and Link Child Fields properties of the subform control.

Then re-read what I wrote in post #6.

Right I see now.
I am getting a run-time error: 2101
The setting you entered isnt valid for this property.
Code:
Private Sub Command12_Click()
Me.subInput.SourceObject = "subInternalSurvey"
End Sub
Private Sub Command22_Click()
Me.subInput.SourceObject = "subExternalSurvey"
End Sub

Sorry works now. My fault my forms were'nt called what they where lol.
Thanks for you help great stuff!
 
When you type

Me.subInput.

in the pop-up, do you see a SourceObject property?
 

Users who are viewing this thread

Back
Top Bottom