Question : Move cursor to field using after update event

I have a main form called PO_Main, within it is a sub form called PO-details, within PO-details is another subform. I have it setup right now so that after updating the last filed in the sub form it starts a new record for the main form. I used the following code:

Private Sub Combo8_AfterUpdate()

DoCmd.GoToRecord , "PO_Main", acNewRec

End Sub

Now that's all fine but when I do this the cursor stays in the last field of the subform. I would like the after update to also move the cursor to the first field in the tab order of the main form.

How may I accomplish this?  note: the main form does not appear in the tab order dialog box for the subform in question.

Answer : Move cursor to field using after update event

You could use this format
Forms!yourFormName!yourFieldName.setfocus

That what you're looking for?

Walt
Random Solutions  
 
programming4us programming4us