Re: loop through rows on a continuos form
- From: "mcnewsxp" <mcourter@xxxxxxxxxxxxxx>
- Date: Sun, 11 Jun 2006 08:04:41 -0400
That code makes no attempt to loop through records, it's
only trying to loop through the controls in a subform's
current record.
right.
i need to go from there and loop through the records.
While that code is archaic, I think Access will still
process it as intended.
sure it works.
is there a better way?
If you really want to loop through the records in a form
(subform?), how you do it depends on what you are trying to
accomplish.
i need to loop through the values on the continuous subform's records to
compare them to what is already in another existing table.
OK, it sounds like you are not trying to scroll the records,
so Jen is right about using the subform's RecordsetClone.
If the code is in the main form's module, then I think this
aircode should give you the general idea of how to loop
through thesubform's records and their fields:
If ctlCntrl.ControlType = acSubForm Then
With ctlCntrl.Form.RecordstClone
If .RecordCount > 0 Then .MoveFirst
Look at each record in the form's dataset
Do Until .EOF
Look at each field in the record
For Each fld In ctlCntrl.Form.Fields
Debug.Print fld.Name, fld.Value
Next fld
.MoveNext
Loop
End With
End If
Be sure to check Help for anything in the above that you are
not familiar with.
thanks, i will try that on monday.
that is kind of the direction i was heading, but couldn't figure out syntax
for recordsetclone with all the abstraction.
.
- Follow-Ups:
- Re: loop through rows on a continuos form
- From: mcnewsxp
- Re: loop through rows on a continuos form
- References:
- loop through rows on a continuos form
- From: mcnewsxp
- Re: loop through rows on a continuos form
- From: Marshall Barton
- Re: loop through rows on a continuos form
- From: mcnewsxp
- Re: loop through rows on a continuos form
- From: Marshall Barton
- loop through rows on a continuos form
- Prev by Date: Re: same old "Data has been changed error message", way around this?
- Next by Date: ADVANCE FILTER/SORT
- Previous by thread: Re: loop through rows on a continuos form
- Next by thread: Re: loop through rows on a continuos form
- Index(es):
Relevant Pages
|