views:

230

answers:

1

I have an Access database with a form in which a user clicks a button which in turn runs a macro which also runs a function in a module. Yes, convoluted and no, I am not allowed to change much since it's the customer's application.

What I need is to read some combo-boxes and a radio button from the form in the function that's in the module and is called by the macro at the button's push. How can I do this?

+2  A: 

You could use Screen.Activeform to get the form, or iterate through the Forms collection or, if the change is allowed, pass the name of the form to the function.

Once you have the name of the form, it is easy enough to refer to the controls:

Forms![Name of Form]![Name of Control]

Or

Forms!NameofForm!NameofControl
Remou
Thanks! It worked :D
Andrei Rinea