Mainform/Subform

I have a form with 2 subforms(Material and Process). The 2 subforms have the same source table; the first subform (Material) is used to enter raw material details; the second form (Process) is used to enter process type details. The main form itself is the BOM card. Depending on where the cursor is at the present time, I need to run one of two functions. Function 1 is defined in subform 1, function 2 is defined in subform 2. In the main form I have a menu button ‘Lines’ and an option under the button ‘Link with Sales Lines’ If my cursor is on a line in the Material subform I need to run the command: CurrForm.Material.FORM.ShowLink; If my cursor is on a line in the Process subform I need to run the command: CurrForm.Process.FORM.ShowLink; Please advise how I can find out in which form the cursor is. thanks. Pari Somasundaram

Hey Pari, as far as i know there is no way to see where the cursor is currently. But why don’t you create two buttons, which starts the required process. If there should be shown only one of the two subforms simply lay one subform over the other and make the needed subform visible and the othe unvisible. So the user is shown only the subform he needs.

quote:


Originally posted by StefanWeinreich
Hey Pari, as far as i know there is no way to see where the cursor is currently. But why don’t you create two buttons, which starts the required process. If there should be shown only one of the two subforms simply lay one subform over the other and make the needed subform visible and the othe unvisible. So the user is shown only the subform he needs.


Thanks. I have worked around the problem by creating a button in each of the subforms; so on the main form the subform along with its button appear. Pari somasundaram