Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subforms inside form

Status
Not open for further replies.

smurf01

IS-IT--Management
Jul 6, 2002
470
GB
Is it possible to have 2 subforms embedded into one main form. I have a Form(frmPapersType) which has 3 comboboxes on it plus a subform (frmPaperTypeResults). after the comboxes are updated then the subform shows the results.

At the moment I have an onClick event in the subform which opens another form to show data relating to the selected record. The onClick event opens the new form (frmNewGrade) as a pop up. I could not get the form (frmNewGrade) to refresh without having the open form event.

The only problem with this is that the screen flickers each time a new record is selected because of the open event. I wondered if I embedded the pop up form whether I would then be able to refresh (frmNewGrade) from the record selector

Regards

Paul
 
Hi

There is no reason why you cannot have two (or more) subforms on the main form. You can also have (if you wish) a sub form nested within a sub form

Are you using the link master/child properties of the sub form cause the subform to show the relevant records, or are you doing it via criteria on the query on which the subform is based?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Ken,
I am using criteria based on the queries for the current subform, and I am then using code that I worked out from a thread that you answered last week (thread702-717468) to requery the pop up form. The code I am using is as below

Code:
Private Sub Form_Click()
Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmNewGrade"
    
    stLinkCriteria = "[Record_ID]=" & Me![Record_ID]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub

I could work out a way to requery "frmNewGrade" and so I went for this option.

If you can give me any pointers it would be much appreciated

Regards

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top