L
Larry R Harrison Jr
I have Access 97 and a database which fills in new values in a
****subform***. It plucks the values from the main form and plugs them into
EXISTING RECORDS in the subform. What I need for it to do is to loop and
keep doing this until it reaches the last recordset of the subform.
The code I have so far looks like this:
' Searches for the 1st entry whose date matches the current date
DoCmd.FindRecord Date, acEntire, False, , False, , True
For n = 1 To 3
Me.sfrSchedule![qty] = Me.txtPartsShift
Me.sfrSchedule![partid] = Me.part_currently_run
DoCmd.GoToRecord , , acNext
Next n
Obviously the n=1 to 3 makes it do it for the 1st 3 lines. The pattern of
the records in the subform is that there are ALWAYS 3 lines for each date.
Instead, what I need it to do is start from where it found the date match
and keep going until it reaches the last record (regardless of the date),
then STOP. Don't keep adding new records.
Tips?
LRH
****subform***. It plucks the values from the main form and plugs them into
EXISTING RECORDS in the subform. What I need for it to do is to loop and
keep doing this until it reaches the last recordset of the subform.
The code I have so far looks like this:
' Searches for the 1st entry whose date matches the current date
DoCmd.FindRecord Date, acEntire, False, , False, , True
For n = 1 To 3
Me.sfrSchedule![qty] = Me.txtPartsShift
Me.sfrSchedule![partid] = Me.part_currently_run
DoCmd.GoToRecord , , acNext
Next n
Obviously the n=1 to 3 makes it do it for the 1st 3 lines. The pattern of
the records in the subform is that there are ALWAYS 3 lines for each date.
Instead, what I need it to do is start from where it found the date match
and keep going until it reaches the last record (regardless of the date),
then STOP. Don't keep adding new records.
Tips?
LRH