Formatting Each Record in a Subform Separately
Formatting Each Record in a Subform Separately
(OP)
I want to run some code on each record of a continuous subform. What I am looking for is something similar to the 'on format' in the detail section of a report. I want to adjust some buttons' text colors based on some code that I run. The code uses a field that is on each record in the subform. The buttons are also located on the subform. So when you view the subform, there are two buttons for each record. I tried using the 'on current', but it changed every record on the form to the same thing, based on which record you clicked in. Maybe I'm trying to do something that isn't possible!!! However, I've found that many things that I thought were impossible can be solved by people in this forum.
Mike Rohde
rohdem@marshallengines.com
Mike Rohde
rohdem@marshallengines.com
RE: Formatting Each Record in a Subform Separately
in a module
this is called like so
=FunctionName([Somefield]) 'Note this can be used in a report or a form or a query.
Now depending on what you pass to the function it could return whatever.
You use VBA to do any number of things in the function.
But it can get slow if it does a lot or if you have lots of records.
Think of it like a balck box you pust something in and it works on it a returns something back.
Note you can pass as many paramters in as you like. But it can only return one value back.
DougP, MCP
dposton@universal1.com
Ask me how Bar-codes can help you be more productive.