The following works when I was using Access 97, but now that I have upgraded to Access 2000, the following doesn't:
Basically, I have a main form(referred to as Me) whose datasource is Table A, and subform named as childDetails in the main form whose data source is Table B. The main form and subform are linked through child master field on two fields from Tables A and B.
I want the above code to basically add a new record in Table B which is linked to the subform on invoking the above code from the Main form.
At Access 2000, it just wouldn't add any new records to the subform and the current record is ALWAYS set to the first record.
does not help either, except that it causes asn error "Field locked and not updatable" when I attempt to close the form.
codes like
causes compilation error, as does
.
Any suggestions as to How I could navigate/add new records on a subform from a main form?
Code:
Me.childDetails.Form.RecordsetClone.AddNew
Me.refresh
Me.repaint
Me.childDetails.Form.refresh
Me.ChildDetails.Form.repaint
Basically, I have a main form(referred to as Me) whose datasource is Table A, and subform named as childDetails in the main form whose data source is Table B. The main form and subform are linked through child master field on two fields from Tables A and B.
I want the above code to basically add a new record in Table B which is linked to the subform on invoking the above code from the Main form.
At Access 2000, it just wouldn't add any new records to the subform and the current record is ALWAYS set to the first record.
Code:
Me.childDetails.Form.bookmark = Me.childDetails.Form.RecordsetClone.Bookmark
codes like
Code:
DoCmd.GoToRecord acDataForm, Me.childDetails, acNewRec
Code:
DoCmd.GoToRecord acDataForm, Forms![frmLinkedtoTabA.Form]![frmLinktedtoTabB].Form, acNewRec
Any suggestions as to How I could navigate/add new records on a subform from a main form?