Looking up a field on a form

craigachan

Registered User.
Local time
Today, 11:47
Joined
Nov 9, 2007
Messages
285
Can anyone tell me if there is a way to look up a field on a form. I have a menu bar, which is really a subform with buttons. This menu bar may be on several different forms. Some of the buttons, opens forms based on the information on the currently open form. Since some of the forms may be closed at any particular time, I need to open a dialog form based on patient information that is currently open in my form.

so I'm thinking to look up the fields on all of the forms. If the form is not open, the field would return a null value and then go to the next form.

So what I'm asking is there a way to see if a form is open or not, and then if not open, go to the next line of code, and so forth, until we find the open form and the info that I want. I'm not sure if this is clarification enough but hopefully you'll understand what I'm trying to do.

thanks to anyone who can help.
 
If you know the control's name, you don't really need the form's name. You can get the value with:

Me.Parent!ControlName

If that doesn't help, you can search for IsLoaded to find methods to see if a given form is open.
 
Thanks so much. I didn't know about the 'Parent' thing. It solved my problem. Such a simple thing. I love this forum!
 

Users who are viewing this thread

Back
Top Bottom