Control subform range with two combo boxes

P

Paul R in Oregon

Tables = tblIssue and tblManuscripts with one-to-many relationship

frmChooseIssuesDialog has cboFirstIssue and cboLastIssue combo boxes
based on one-field query on tblIssue

qry4subfrmDisplayChosenIssuesAndManuscripts queries tblIssue and
tblManuscripts and has following parameter under tblIssue.Issue field:

Between [Forms]![frmChooseIssuesDialog]![cboFirstIssue] And
[Forms]![frmChooseIssuesDialog]![cboLastIssue]

How do I get a sub form to display the manuscripts associated with the
issues in the range defined by the two combo boxes?
 
G

Guest

It sounds as if you've got all you need. I assume you've created a subform
in frmChooseIssuesDialog where you want the manuscripts to appear? Just set
the record source of this subform to
qry4subfrmDisplayChosenIssuesAndManuscripts and you're about there. I'd
suggest adding an after update event to the second combo box (you could do it
for both combos) that requeries the subform so that the user just has to
choose the issue number to see the new list, i.e.

Private Sub cboLastIssue_AfterUpdate()
Me.[name of subform].Requery
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top