nested subform selection/focus problem

dvh

Registered User.
Local time
Today, 17:04
Joined
Aug 23, 2006
Messages
28
i have nested forms up to 2 levels for now. The subs in datasheet view.
I'd like to know if which subform has the focus. I tried various way like using PreviousControl or ActiveControl property but failed at sub2 as its the control on sub1.

anyone has any idea?
thanks
 
any one has any idea? :)
to elaborate, i need to pull out information from a field in either sub1 or sub2 when the focus is on a particular record on either sub1 or sub2 hence the need to check if which sub form has focus.
I know sub2 will be treated as a control on sub1 so how can i differentiate them?
thank you
pls ask me if its unclear
 
Last edited:
Have you tried using the current event of each form to set a Global variable with the current SubForm name?
 
Thank you for your reply!

I tried using get focus and lost focus events of a hidden button on sub2. It didn't work when opened as a control of sub1 but worked if opened as a form on its own.

I am not sure if i know correctly what u meant but will try that anyway.Thanks again

Maybe there is a much easier way??:o
 
well..I solved it finally.
Just to share my experience with whoever may need it
1. i created a public variable and use it as part of the condition. Thank you Rural
2. rectify my mistake of using wrongly the events of subform. Shoud use subform control's events not subform's!!
 

Users who are viewing this thread

Back
Top Bottom