Goto NewRecord in SubForm

aqif

Registered User.
Local time
Today, 08:46
Joined
Jul 9, 2001
Messages
158
Hi
smile.gif


I've got an unbound form which acts like a calculator and it has got a subform which is bound to a Table. What I want is that after calculating the values from Unbound form the Cursor should goto NewRecord position in Subform but for some reason its not working. I am trying something like tht

DoCmd.GoToRecord acForm, "SFrmAssessments", acNewRec

It gives me error that Object SFrmAssessments is not opened.
I have also tried to alter the code like

DoCmd.GoToRecord acForm, "Forms!FrmAssessments!SFrmAssessments", acNewRec

Or

DoCmd.GoToRecord acForm, "FrmAssessments!SFrmAssessments", acNewRec


But it is giving me same error....any suggestions?

Cheers!
Aqif
 
Two statements are required
DoCmd. GoToControl
DoCmd.GoTo Record etc.
 
Dear Rich:

I am using both the statements like

DoCmd.GoToControl "SFrmAssessments"
DoCmd.GoToRecord acForm, "Forms!FrmAssessments!SFrmAssessments", acNewRec

it is still giving me same error as "The object Forms!FrmAssessments!SFrmAssessments is not open

any suggestions?

Cheers!
Aqif
 

Users who are viewing this thread

Back
Top Bottom