Record operations with subform

alcifer_c

Registered User.
Local time
Today, 03:21
Joined
Jun 3, 2002
Messages
42
I'm trying to move to a new record in a subform... I haven't been able to get it going, so I put a command button on the main form with the following code attached for testing purposes...
Code:
Me.frmsubfrmSiteanalysis.SetFocus
DoCmd.GoToRecord acDataForm, "Me.frmsubfrmSiteanalysis.Form", acNewRec

Whenever I try, the error message indicates that the form is not open. Funny thing is that if I put any old name in the brackets, same message. Odd because the setfocus does work. I've tried different incarnations such as assigning the form name to a variable, with or without the setfocus....nothing doin'
Please help!

thanks, Al
 
This worked for me:

Me.SubformName.SetFocus
DoCmd.GoToRecord , , acNewRec

Dave
 
Okay it works...

Thanks...
I had done this before, but the problem was with the structure of the data and subform. Your confirmation made me look elsewhere for the problem.

Al
 

Users who are viewing this thread

Back
Top Bottom