how do I open a form based on data in its subform

  • Thread starter Thread starter Jay Bukstein
  • Start date Start date
J

Jay Bukstein

You need to have bacth number on both forms and use them
in link parent/link child relationship. This is defined
on the form that has the sub form, used in the sub forms
properties box.
 
Thanks for the response. But my donors will have only
one record in the donor form and will have multiple
records in the donor bank info subform. So the batch
number in the subform could have multiple values since
there are multiple records. How would they parent/link
back to the donor form if it's only got one value?
-----Original Message-----
You need to have bacth number on both forms and use them
in link parent/link child relationship. This is defined
on the form that has the sub form, used in the sub forms
properties box.


-----Original Message-----
Here's the set up:
I've got a form, "batch number form", with a control on
it, "batch number box". I want to open up a form, "donor
form" that has a subform, "donor bank info form".
There's a control on the "donor bank info form"
subform, "batch number".

Here's what I want to do:
I want to be in the "batch number form", click a button
and open the "donor form" where [batch number form].
[batch number box] = [donor form].[donor bank info form].
[batch number].

Here's what I tried:
DoCmd.OpenForm "Donor Form", , , "forms![donor form]!
[Donor bank info form]![batch number]=" & "'" & Me! [batch
number box] & "'"

I get no records even though there are records that have
a batch number that's equal to what's in the batch number
bax in the batch number form.

Any ideas?

Thanks,
Boudin
.
.
 
Back
Top