Subforms - passing name to a function

tygger719

New member
Local time
Yesterday, 18:24
Joined
Feb 24, 2005
Messages
5
Hey long time browser, first time poster!

HELP!!!

Ok, here is the problem that I can't seem to find any posts on here talking about. I have a form, let's call it FormA and a subform (subformA). I am using a non-activeX calendar control, which I did not write. I was informed it could be used on subforms but its not working. In reviewing the code it is looking for the activeform name to be passed to it. This works when the calendar function is called in the FormA, but when it is called in SubformA, it can identify the field that I want the date selected to be entered into, but it does not recognize the subform as being the active form.

The code it's using to determine activeform name is:
Screen.activeform.name

From my research I have found that when the subform has the focus, the activeform.name returns the name of the parent form.

The question: How can I determine the subform name and pass it as a variable to the calendar program?

Mark
 
Are you passing the form name to the calendar, or is this some of the code within the calendar?

If the first, pass Me.Name which will give the name of the current form.

screen.activerform.name will not work for a subform, because it is not considered an open form, but a control on the main form on which it resides.
 

Users who are viewing this thread

Back
Top Bottom