Move from sub/sub to Main form progly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is the third time I've posed this question. The first time I didn't ask
it properly. The second time "Ofer" gave me an answer but it was precisely
what I had been doing (Thanks Ofer, what you said made perfect sense but just
didn't work) and now I'd like someone to tell me why this wont work and how
to do it.

After adding/editing a record to a sub/sub form (a subform nested in a
subform on a form) I'd like to move to the next
record of the main form by using the on click event of a button on the
sub/sub. I've tried to set focus and move control to the main form from the
sub then goto next record but either those are not the appropriate tools or
my syntax is bad.

I can move to the next record on the main by clicking on the next record
button. Furthermore, Ofer suggested trying to place the cursor on a field in
the main then hitting the "page down" button on the keyboard. This does
successfully move to the next record. However, one would think this operation
would be easy to do programatically.

Here is the code I've tried to use. Again this is on the click event of a
cmd button on the sub/sub. "frmsEnterLeadResult" is the name of the main form
and "PresOwner" is one of the enabled and visible fields on the main.

Forms![frmEnterLeadResult]![PresOwner].SetFocus
DoCmd.GoToRecord , , acNext

I get the message "Object does not support this Property or Method"

Are there special considerations when moving back from sub/sub to main.

I'd think this would be a fairly common funtion for anyone inputing data
into a subform.

Bill
 
Try stating the parameters explicity as in

DoCmd.GoToRecord acDataForm, "formName", acNext
 
Back
Top