GOTOCONTROL

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!
 
R

Rob

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!
.
 
V

Van T. Dinh

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top