Changing Rows Data in Form RecordSet Results

S

Sacred

Scenario:

This is a check refund system

I have a screen that shows continous forms in a child sub
form. In the main Form it allows the user to search on
particular fields and to pull back a specific query
result based on search criteria.

When they pull these records back they are showed on
single line continous forms in the child sub form.

One of the fields is called Reconciled. This is a check
box.

What I like to do is place a button on the form to allow
them to set all in the current list as reconciled (the
button would check each box for each row in the recordset
and save it)

So I need somehow to start at the beginning of the forms
recordset and loop through the forms recordset until the
end and set the reconciled field to true.

How would I do this?

Many thanks!

Sacred
 
D

Dirk Goldgar

Sacred said:
Scenario:

This is a check refund system

I have a screen that shows continous forms in a child sub
form. In the main Form it allows the user to search on
particular fields and to pull back a specific query
result based on search criteria.

When they pull these records back they are showed on
single line continous forms in the child sub form.

One of the fields is called Reconciled. This is a check
box.

What I like to do is place a button on the form to allow
them to set all in the current list as reconciled (the
button would check each box for each row in the recordset
and save it)

So I need somehow to start at the beginning of the forms
recordset and loop through the forms recordset until the
end and set the reconciled field to true.

How would I do this?

Many thanks!

Sacred

I think this would do it (code running on the main form to update the
form displayed by the subform control "Child1":

With Me!Child1.Form.RecordsetClone
If Not (.EOF And .BOF) Then
.MoveFirst
Do Until .EOF
.Edit
!Reconciled = True
.Update
.MoveNext
Loop
End If
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top