Click to See Complete Forum and Search --> : Problem with using subforms in Access


Abu Musa
November 3rd, 1999, 10:34 AM
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

remoteworks jeff
April 23rd, 2002, 01:22 PM
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