F
figaro
I need to have a global variable always contain the name of the
current form field. This bit of code is attached to the GotFocus
event of all fields and the Enter event of all subforms:
gxCurrentField = Me.ActiveControl.Name
However it doesn't work properly when changing records in a subform.
My parent form contains two subforms in a many-to-many relationship.
The above variable usually ends up containing the name of the first
field in the second subform when switching records in the first
subform.
How to correctly code this? Or is there some native variable I'm not
aware of? I'm using Access 2003.
Hope you can help. TIA.
current form field. This bit of code is attached to the GotFocus
event of all fields and the Enter event of all subforms:
gxCurrentField = Me.ActiveControl.Name
However it doesn't work properly when changing records in a subform.
My parent form contains two subforms in a many-to-many relationship.
The above variable usually ends up containing the name of the first
field in the second subform when switching records in the first
subform.
How to correctly code this? Or is there some native variable I'm not
aware of? I'm using Access 2003.
Hope you can help. TIA.