Hi,
I have a user input page in my application which consist of few text box and a sub-form. In main form I have "Save and Next" button, once the user enter this button will save the current record in database and ready for next user input. The problem here is I am unable to access the sub-form control after saving the records. I have attached the code here.
Private Sub SaveNext_Click()
Me.Refresh
DoCmd.GoToRecord acDataForm, Me.Name, acNewRec
End Sub
Private Sub Form_Close() 'trying to unhide the sub form control, throwing error
Me.AnswerOptions.Form![AnswerOptionCodes].ColumnHidden = False '//Here I am getting an error Run-time error 2455. You entered an expression that has an invalid reference to the property Form/Report.
End Sub
Private Sub Form_Load() 'trying to hide sub for control, working fine
Me.AnswerOptions.Form![AnswerOptionCodes].ColumnHidden = True
End Sub
Regards,
Selvakumar R