Subform does not work inside of tab

sambo

Registered User.
Local time
Today, 12:29
Joined
Aug 29, 2002
Messages
289
I have create three seperate forms from scratch (not using the wizard) and they all work fine indepently. When I combine them all into one form via the tab control, the master form does not recognize any data on the subforms.

Furthermore, when I open the MasterForm I get a popup box asking me for the parameters of my all the queries I created. If I enter no data or click Cancel, the forms appear blank.

Also, if I open the forms independently and then open the MasterForm, the data sheets appear, but still do not post any data.

Help...
 
Don't hard code the relationship to the master form in the query for the subform. Create the relationship with the Master/Child properties of the subform.
 
that sounds great and right on, but unfortunately I have no idea how to do that.
Any code specific tips
 
i tried to link child and master fields but it says 'Cant build a link between unbound forms'
 
Open the subform in design view, then open the datasource query. Delete any criteria referring the Master form. Like maybe you have as a criteria =Forms![MasterForm]![ID].

Do this for all subforms.

Then open the master form in design view. Click on each of the subforms and then show the property window. On the data tab, there should be two properties something like Master Link and Child Link. Click on the ellipsis next to either of the properties to build the link connecting the subform (child) to the Master form (master). Repeat for each of the subforms.
 
How does your subform relate to your master form. Like if your master form displays customer information, your subform might display all orders for that customer.

What is your relationship?
 
I created the forms independently w/ no original intention of using a master form, so... there are no references to the masterform in any of the record source queries.
So I tried to change the master/child field relationship again and I get the same alert 'Cant build a link between unbound forms'
Help...
 
Here's a synopsis of what's going on...

I have a line of code...

Private Sub cboRMA1_AfterUpdate()
Forms![frmDelete].RecordSource = "qryRMA1Delete"
Me.Requery
End Sub

This works just fine when I run the Form "frmDelete" independently.
However, when I insert the form as a subform into a tab control and try to use the same comboBox, I get the following error..
'Cant find form 'frmDelete' referred to in macro expression
Forms![frmDelete].Recordsource='qryRMADelete'

This leads me to believe that the macro is looking for the actual form 'frmDelete', when it should be looking for it inside the MasterForm as a subform.
 
Everything is on the subform since it was created first independently. After creating my forms I inserted them onto the master using the subform/subreport add feature of the control toolbox.
 
Try

Forms![Main Form]![frmDelete].Form.RecordSource = "qryRMA1Delete"

me.requery
 
BREAKTHROUGH!!!
Okay,
Here's the deal. Everybody abandoned me in the middle of my thread last night so I decided to just go ahead and redo the whole form from scratch. This time I created the subforms on the actual main form. That way they were all referenced within the actual mainform. So now I've scratched the entire idea of trying to insert pre-created subforms.
Well... Somewhere along the way I set the allowdeletions property to one of my tabs to false.. This caused bookoo problemos. It worked fine after I figured that out though.
Thank you for all your help charity
 

Users who are viewing this thread

Back
Top Bottom