ACC: GoToRecord Macro Does Not Work on SubformID: Q92685
|
Moderate: Requires basic macro, coding, and interoperability skills.
If you create a GoToRecord macro that points to a subform and run that
macro from the main form, you may receive the following error message:
Object '<Subform Name>' isn't open
Use a GoToControl macro action to specify the subform control name, and then use the GoToRecord action to move to the next record within the subform. Leave the ObjectType and ObjectName arguments of the GoToRecord action blank and set the Record argument to Next.
This behavior is by design.
The "GoToControl Action" Help topic contains a tip which reads as follows:
Tip You can use the GoToControl action to move to a subform, which is a type of control. You can then use the GoToRecord action to move to a particular record in the subform.
Macro Name Condition Action
---------------------------------------
Macro1 GoToRecord
Macro1 Actions
-----------------------------------------
GoToRecord
Object Type: Form
Object Name: Quarterly Orders Subform
Record: Next
Offset: <blank>
On the Tools Menu, click Run Macro, select Macro1, and click OK.In Microsoft Access 7.0:
On the Tools Menu, click Macro, select Macro1, and click OK.In Microsoft Access 1.x and 2.0:
On the File menu, click Run Macro, select Macro1, and click OK.Note that you receive the following error message:
Object 'Quarterly Orders Subform' isn't open
Macro Name Condition Action
-----------------------------------------
Macro1 GoToControl
GoToRecord
Macro1 Actions
-----------------------------------------
GoToControl
Control Name: Quarterly Orders Subform
GoToRecord
Object Type: <blank>
Object Name: <blank>
Record: Next
Offset: <blank>
Keywords : kberrmsg kbusage FmsEvnt
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: March 12, 1999