J
Jolene Updike
I am having the "former" problem addressed in the following post- I want to
open a new form that looks up records based on the criteria set forth in the
first form.
Where do I put that above code? On the command button that opens up the
second form, or on the second form itself (which event)? This seems to be
the solution to my problem, I just can't quite figure out how to make it work.
Jolene Updike
Virginia Commonwealth University Archaeology
open a new form that looks up records based on the criteria set forth in the
first form.
--Is there any way to have two combo boxes and uswe the selections from both to
open a subform? I would want to select a number and a date and then show all
records that meet that criteria.
thanks
Sara
Do you want to *open* a new, pop-up form? Or are you talking about a
true Subform, which is permanently open in a subform control on the
mainform?
If the latter, you can use the names of the two combo boxes, separated
by a semicolon, as the Master Link Field property of the subform
control; and the two fields to be searched (again separated by
semicolons) as the Child Link Field.
If you're opening a new form instead, you can set the WhereCondition
property to a text string containing the values of the two combos:
Dim strWhere As String
strWhere = "[FieldA] = " & Me!cboComboA _
& " AND [FieldB] = " & Me!cboComboB
DoCmd.OpenForm YourForm, WhereCondition := strWhere
Where do I put that above code? On the command button that opens up the
second form, or on the second form itself (which event)? This seems to be
the solution to my problem, I just can't quite figure out how to make it work.
Jolene Updike
Virginia Commonwealth University Archaeology