By no means with “negative waves” but I don’t think you will be able to find a way to do it in a normal Access Continuous Forms (ACF). I mean that in a positive sense because a lot of time can be wasted on looking for something which doesn’t exist.
If it existed then someone would know about it. And if someone knew about it, it would almost certainly be on Stephen Lebans site. It’s not.
There are some things we can do with ACFs but they are rare and, as far as I know, always bound to the data in the specific record with the focus.
And that could also apply to conditional formatting. If, for instance, the data in the recordset of a Form changed would conditional formatting cause a change in all records? It might be easy to answer that question with a yes but I think the real answer is no. ACFs might have 200,000 records and it would not seem logical to me to try to apply formatting to all the records. To me, it would seem more logical to only apply formatting to the visible records, perhaps 50. We could ask that point as a question; what would be the point of formatting something we can not see?
We may even come to the conclusion that records in an ACF do not contain controls at all but rather images of controls. The only record which contains controls is the record with the focus. If we look at it that way we might start to see what happens with a command button. When we click on a button on an ACF the first thing which happens is the record gets the focus. When the record gets the focus the images are converted back to controls. The button which is clicked then behaves like a button. The other images of that button are not updated because there is no point in doing so.
And the same goes for text boxes on an ACF. We can not enter data into a text box until that text box has the focus. Prior to the text box getting the focus the record gets the focus. The record getting the focus converts the image of the text box to a real text box.
So it could be asked; if we change a property of a control on an ACF then why are all the images of that control changed? The answer to that question might simply be that that is the way Microsoft does it.
----------
If we want something different we write it ourselves, fun and games…
Multiple subform controls are good. The subform control contains a Form and that Form contains a Class module. The Form in that subform is not ‘Opened’ in the normal sense, it is instantiated. When the Form is instantiated so to is its Class module. Each instance of the instantiated Form is a separate entity and can behave differently under program control.
And that is what was used in the demo I posted. In that demo there are three records each handled by a different subform control containing an instantiation of the same Form. There is only one Form, with its Class module, which is required for all records. And because there is only one Form and Class module that only requires writing it in one place.
For some idea of instantiating subforms, up to about 50 with the same Form, look here:-
http://www.access-programmers.co.uk/forums/showthread.php?t=226352
It is not well understood that Forms in subform controls are instantiated and, as such, are not ‘Opened’ but are separate entities. People become wise after the fact.
----------
But I hear “negative waves”; if we have 200,000 records we would need 200,000 subform controls.
No, and for the same reason I think Microsoft didn’t do it that way. We only need as many subform controls as we can fit into view on screen, probably 50 at the very most. And for the sort of thing we are talking about here, less than 15.
----------
To push forward…
The challenge is not how to do it with subform controls. Nor is it to do with the Form in that control.
The challenge is to do with managing the records displayed within those subform controls. The first record displayed, the number of records to display and how we navigate the total number of records to display.
So, on a positive note, I think that is where the time should be spent.
Managing the records and not trying to find something which might not exist.
Chris.