Nov 6, 2013 #1 zevw MIS Jul 3, 2001 697 US I have a record selected in a subform and I click on delete in the parent form I know I can do Form![Parentform]![Subform].subform How can I get the name of the subform with Me.Name Me.Name gives me the parent form name not the subform name
I have a record selected in a subform and I click on delete in the parent form I know I can do Form![Parentform]![Subform].subform How can I get the name of the subform with Me.Name Me.Name gives me the parent form name not the subform name
Nov 6, 2013 #2 PHV MIS Nov 8, 2002 53,708 FR Did you try this ? Me![subform control].Form.Name Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
Nov 6, 2013 #3 PHV MIS Nov 8, 2002 53,708 FR Or perhaps this: Screen.PreviousControl.Parent.Name Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
Nov 7, 2013 Thread starter #4 zevw MIS Jul 3, 2001 697 US Thanks! Since it was in tab control it was giving me the name of the Tab. So I used Code: FrmName = Screen.PreviousControl.Form.Name Upvote 0 Downvote
Thanks! Since it was in tab control it was giving me the name of the Tab. So I used Code: FrmName = Screen.PreviousControl.Form.Name
Nov 7, 2013 Thread starter #5 zevw MIS Jul 3, 2001 697 US How do I now combine the variable with this string Code: WrdNum = "Forms!ReviewForm!" & FrmName & ".Form.WordId" doesn't work its a string Code: WrdNum = Forms!ReviewForm![FrmName].Form.WordId It doesn't recognize FrmName as a variable? Upvote 0 Downvote
How do I now combine the variable with this string Code: WrdNum = "Forms!ReviewForm!" & FrmName & ".Form.WordId" doesn't work its a string Code: WrdNum = Forms!ReviewForm![FrmName].Form.WordId It doesn't recognize FrmName as a variable?
Nov 7, 2013 1 #6 PHV MIS Nov 8, 2002 53,708 FR I'd try this: WrdNum = Eval("Forms!ReviewForm!" & FrmName & ".Form!WordId") Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
I'd try this: WrdNum = Eval("Forms!ReviewForm!" & FrmName & ".Form!WordId") Hope This Helps, PH. FAQ219-2884 FAQ181-2886