Randomblink
The Irreverent Reverend
- Local time
- Today, 16:11
- Joined
- Jul 23, 2001
- Messages
- 279
I have a form that has MULTIPLE Subforms that COULD be necessary...
Now I realize I could open each subform using a button on the main form...but I don't wanna...
I also realize I could create MULTIPLE subforms on the main form, but that slows everything down when a form has to load up to seven subforms...(this was the previous way I did this form)
I am re-writing and want to click a button...
And the EMPTY subform control connects to the correct subform based on the button clicked...
However, I can't seem to make this happen for the life of me...
Does someone have any idea why?
I get errors that state you can only create subforms in Design mode of a form? Others that say this Object cannot be created in VIsual Basic...? I just keep getting confused...
Here is the basic code I was attempting to use:
Private Sub btn_ViewSponsorSubfrm_Click()
Dim newsub As New SubForm
With newsub
.Left = 0.9792
.Top = 2.3542
.Height = 5760
.Width = 4320
.SourceObject = "subfrmMed_SponsorBasicListing"
.LinkMasterFields = "Proj_ID"
.LinkChildFields = "Proj_ID"
End With
Me.Refresh
End Sub
If you can help me, I would be grateful...
Now I realize I could open each subform using a button on the main form...but I don't wanna...
I also realize I could create MULTIPLE subforms on the main form, but that slows everything down when a form has to load up to seven subforms...(this was the previous way I did this form)
I am re-writing and want to click a button...
And the EMPTY subform control connects to the correct subform based on the button clicked...
However, I can't seem to make this happen for the life of me...
Does someone have any idea why?
I get errors that state you can only create subforms in Design mode of a form? Others that say this Object cannot be created in VIsual Basic...? I just keep getting confused...
Here is the basic code I was attempting to use:
Private Sub btn_ViewSponsorSubfrm_Click()
Dim newsub As New SubForm
With newsub
.Left = 0.9792
.Top = 2.3542
.Height = 5760
.Width = 4320
.SourceObject = "subfrmMed_SponsorBasicListing"
.LinkMasterFields = "Proj_ID"
.LinkChildFields = "Proj_ID"
End With
Me.Refresh
End Sub
If you can help me, I would be grateful...