subform: event that fires for every record

E

eux

Hi,

does anybody know if there's an event similar to form onload, but that
fires itself for every row of a continuous subform?

what I need in this continuous subform is to fill a field with a
complex vba formula, so I need some code being executed for every
record in the subform.

Thank you, have a nice day!
 
T

TC

When you say fill a "field", I assume you mean a /control/ - like a
textbox - not a field in the bound table of the form?

If so, just set the controlsource of the textbox to this:

=MyFunction()

Then in the code module of the form, define that function to return the
appropriate value.

The function can see the values from the relevant record, just by
looking at the fields (not controls) of the form.

The resultant textbox will not be updatable.

HTH,
TC (MVP Access)
http://tc2.atspace.com
 

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