GOTOCONTROL

  • Thread starter Thread starter Robert Ross
  • Start date Start date
R

Robert Ross

I have a main form "Batch Form" with a subform "Work Form"
and a 2nd subform "NumberWorked subform".

I want to move from a record in the "Work Form" subform to
the field "Item" in the main "Batch Form".

I need to do this using a Macro, as our company will not
allow direct VB programming.

Here is what I tried as a Macro:
Action: GoToControl
Control Name: Forms![Batch Form]![Item]

I get an error:
"There is no field named 'Forms!Batch Form![Item]' in the
current record."

Help!
 
Steve,

I can't believe it was that easy! I downloaded a
form "Syntax for main/subforms" that supposedly lists how
to call to items from the Main Form to Subform or
reverse. It stated:
"Me.Parent!ControlName"...that's what got me confused.
I'm now guessing that's only for changing properties from
a main form to subform or reverse?

THX!!
-----Original Message-----
Robert,

Just put [Item] in the Control Name argument of the macro.

--
Steve Schapel, Microsoft Access MVP

Robert said:
I have a main form "Batch Form" with a subform "Work Form"
and a 2nd subform "NumberWorked subform".

I want to move from a record in the "Work Form" subform to
the field "Item" in the main "Batch Form".

I need to do this using a Macro, as our company will not
allow direct VB programming.

Here is what I tried as a Macro:
Action: GoToControl
Control Name: Forms![Batch Form]![Item]

I get an error:
"There is no field named 'Forms!Batch Form![Item]' in the
current record."

Help!
.
 
I think whatever you downloaded was meant for VBA, not Macros. Lots Macro
actions, especially GoToControl, SetValue, etc ... assume the Active Data
Object, i.e. the current Form, Report ... In these actions, you don't have
to reference the Active Data Object.
 
Back
Top