Setting the Value for a field

G

Guest

I have a form with a subform with a continuous form property set. The
records in the subform have one field. I would like to set the value of a
second field in the record set when the control is updated, though I don't
want to have a control for the second field on the form. How can I do this
programatically?
 
M

Marshall Barton

Wavequation said:
I have a form with a subform with a continuous form property set. The
records in the subform have one field. I would like to set the value of a
second field in the record set when the control is updated, though I don't
want to have a control for the second field on the form. How can I do this
programatically?


Make sure the other field is in the subform's record source.
Then you can use a line of code in the first text box's
AfterUpdate event:
Me.[second field name] = something

If that gives you any trouble, add an invisible text box
bound to the second field.
 

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