On Sep 20, 1:51 pm, Ben <bmarl...@gmail.comwrote:
Quote:
On Sep 20, 10:37 am, birt <birtwistl...@sierramgt.comwrote:
>
Quote:
I have a form with two subforms on it. On my 2nd subform I want to
open a new form base on three criteria. One is a string two are
integer. It has been over six years since I have done this and I have
tried many ways but nothing is working. Any help will be greatly
appreciated. Don't laugh too hard but my last try is as follows:
>
Quote:
Private Sub Form_DblClick(Cancel As Variant)
>
Quote:
DoCmd.OpenForm "CostElementsFrm", , , "[sol_no] = " & Me![Sol_No]
And [SubSortKey] = Me![SubSortKey] And [CostContractor] = Me!
[CostContractor]
>
>
I'm confused, what is "Me!" referring to? Is it the form, the
subforms, or the form you are opening?
If you are setting values in the form you are opening it should either
be tied directly to the first form, or set with an on open event.
I will try to be clearer.
Me is referring to the subform and I am not setting values. I want to
open a form (CostElementFrm) from subform2 where the field (sol_no,
subsortkey, and costcontractor) values on the CostElement form equal
the values of the subform.
The Main Form links to Subfrm1 through the field sol_no.
Subfrm1 links to Subfrm2 through the fields Sol_No and
CostContractor.
SubFrm2 need to open form (CostElementFrm) where the value from fields
Sol_No, CostContractor and SubSortKey equal the same field values on
Subfrm2.
Hope this helps. Thank you.