Updating Multiple rows in a Subform

  • Thread starter Thread starter TheNovice
  • Start date Start date
T

TheNovice

Good Day All,
(Yes its me again!!!)

I have a Form with a SubForm, the main Form is from tmpHdrRoutes and the Sub
Form is from the source table.

The header information is what can change (i.e. Route Number, Clock-in etc.)
this info needs to be updated to the subform.

thanks to Beetle, and Jay I have the right code to work with, but this is
my Problem.

I need it to update multiple rows at one time.

This is what I am using.

Private Sub hdrroutes_AfterUpdate()
me.frmSubhdrRoutes_Stops.form![routes] = Me.hdrroutes
End Sub
 
The header information is what can change (i.e. Route Number, Clock-in etc.)
this info needs to be updated to the subform.

Does not seem to be a proper database design from the little I see. Data only
exists in one place in the database unless it is part of a relationship.
 
you are 100% correct in your logic, and if it were upto me I would have
changed it but I inhereted it.

The primary table is only a temporary table. and it has the header
information. the destination table has the info compiled into it for
reporting. at times the data is incorrect or missing. therefore the source
updates the destination.

Please let me know how this can be updated. I realize it is redundant but
the need is there.
 
you are 100% correct in your logic, and if it were upto me I would have
changed it but I inhereted it.

The primary table is only a temporary table. and it has the header
information. the destination table has the info compiled into it for
reporting. at times the data is incorrect or missing. therefore the source
updates the destination.

Please let me know how this can be updated. I realize it is redundant but
the need is there.

The only way I see to do this is to build a query string for an update query,
then execute it, requery your subform, and set focus wherever you want.

It is probably rather simple. You know the record source of the subform. You
know what table columns need to be changed and the main form fields from where
the new values will come. You know what field(s) and column(s) limit(s) the
records that need to be change.
 
Back
Top