Record operations with subform (1 Viewer)

alcifer_c

Registered User.
Local time
Today, 14:45
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
 

Oldsoftboss

AWF VIP
Local time
Today, 23:45
Joined
Oct 28, 2001
Messages
2,499
This worked for me:

Me.SubformName.SetFocus
DoCmd.GoToRecord , , acNewRec

Dave
 

alcifer_c

Registered User.
Local time
Today, 14:45
Joined
Jun 3, 2002
Messages
42
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

Top Bottom