Please help...losing my mind on this one.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Main form with a field called "Name". It is a lookup field with
three columns and it is bound to the first column.

On my subform, I have a field called "Percentage". I need the second column
of the Main form "Name" to populate in each record of the subform associated
to that main record.

I figured out how to do it from the main form, but it only populates the
first record of the subform.

Please help!
 
Sounds like you have a design problem. If the value is the same for all the
rows of the child table, the value should be stored in the parent table and
obtained by joining to the parent table whenever the data is required.

If the value that you are applying to the child records is actually only a
default that may later be changed individually so that it could actually be
different on each row, you will either need to run an update query to update
the rows of the child table or you will need to use the subform's recordset
clone in a VBA loop to update each child record. I recommend the update
query. Are you sure you don't need to take into account any child records
where the default has already been changed and bypass updating them? If
that is the case you would need to include additional criteria to select
only those rows where the value was null or not equal to the original value
in the parent record.
 
Back
Top