CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    9

    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


  2. #2
    Join Date
    Apr 2002
    Posts
    1

    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






Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured