Cathi/David...
Thanks for the answer. I was originally using 'form'. When I changed the parameter on the receiving end to the name of the form class, that worked, and gives me what I was looking for?
A follow-up question, based on David's response. This approach works so long as the control modifier is either public or internal. If the controls are private/protected, then obviously that won't work.
I understand why, in principle, the use of public/internal modifiers is generally discouraged...however, this seems to be the only way for a 'rules class' to have access to the controls on a form.
Main reason I'm looking to do this, ironically, is to avoid another 'no-no'...significant amounts of business logic code in the same source file as the UI.
The types of things I want to do in this 'rules' class:
- Define grid contents
- Reading contents of a custom QBE screen and building a WHERE clause
- Defining bindings for controls
- Other miscellaneous operations that require examining contents of controls
Any additional thoughts?
Thanks,
Kevin