To use the gotorecord method of the docmd object, I think the object where you wish to perform the method on, needs to have focus, so prior to the command, try somethin like this:
[tt]me("subformcontrolname").setfocus
docmd.gotorecord,,acgoto,3[/tt]
- and yes, the issue might also very well be that the subform
control name (which is used in referencing) might differ from the name of the subform as viewed in the database window. Easiest way of obtaining the correct reference, in my view, is to enter the control source of a control residing in the form where you wish to invoke the reference, use the expression builder, double click thru forms, loaded forms, main form, subform and a control on the subform. Here's a link on
How to refer to a control on a subform or subreport in Access 2000
The DAO method for action queries: currentdb.execute sSql, else the docmd.runsql sSql also works (except you'll need to turn the warnings on and off).
Roy-Vidar