Repeat values

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

Guest

hi
I have a form and a sub form, the sub form is connected to a query.
If I to write a value in form, how can I repeat for all records of sub form?

--------------------------
form | --------- |
| value | 123 | |
--------------------------
---------------------------
| abc 123
sub form | bga 123
| xyz 123
| tkd ...

thanks
 
You probably don't want to do that.

Post back with a more complete description of what you're trying to
do.

HTH
 
I'm trying repeat (to copy) values for all records . For ex, with click in a
cmdButton
--
Sérgio Aires
Lisboa
Portugal


"Larry Daugherty" escreveu:
You probably don't want to do that.

Post back with a more complete description of what you're trying to
do.

HTH
 
Ours is not the task to wonder why but something Like this ought to do it:

Sub cmdUpdate_Click()

Dim Rsc AS DAO.Recordset
Set Rsc=Me.MySubFormControl.Form.RecordSetClone
If Rsc.BOF And Rsc.EOF Then ' No records
exit sub
end if
Rsc.MoveFirst
While not RsC.EOF
RsC.edit
RsC.Fields("FieldToUpdate") = Me.UpdateFrom
RsC.Update
RsC.Movenext
Wend
set RsC = Nothing

End Sub

You may have to add extra code to requery the subform but...

HTH

Pieter


Sérgio Aires said:
I'm trying repeat (to copy) values for all records . For ex, with click in
a
cmdButton
--
Sérgio Aires
Lisboa
Portugal


"Larry Daugherty" escreveu:
 

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

Back
Top