Problem with using subforms in Access
Hi
I am having problems using subforms in Access. If I embedd a subform which appears as a datasheet on a main form, I have problems using the
DoCmd.GotoRecord(....) when using this for the subform object from the main form code page.
e.g.
Private Sub cmdAdd_Click()
Forms!f001Country![CountryList].Form.AllowAdditions = True
Me!CountryList.SetFocus
DoCmd.GoToRecord acDataForm, "Forms!f001Country![CountryList].Form", acNewRec
End Sub
In the above "CountryList" is the name of the subform.
Your help is much appreciated
Abu Musa
Re: Problem with using subforms in Access
This works if you're desperate:
'this code goes under the main form
sub cmdGotoNextRecord
sfr.form.timerinterval = 100
end sub
'this code goes in the sub form
sub form_timer
docmd.gotorecord,,acNext
me.timerinterval = 0
end sub