Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Location
    UK
    Posts
    10

    Question Unanswered: Subform Problem...

    Hi,
    Does anyone know how to make the DoCmd method access a subform. Basically what im trying to do is make a button which is on a normal form, goto a new record on a subform...

    DoCmd.GoToRecord acDataForm, "[Subform???]", acNewRec

    If i put in the form name i get an error saying that the form is not open (which is expected as its a subform), and im not sure or any other ways to referace to inside the subform?

    Any help would be really appreciated,
    Thanks,

    Tim Alston
    Gamalan Media Group

  2. #2
    Join Date
    Feb 2002
    Posts
    55

    Re: Subform Problem...

    Originally posted by jethro
    Hi,
    Does anyone know how to make the DoCmd method access a subform. Basically what im trying to do is make a button which is on a normal form, goto a new record on a subform...

    DoCmd.GoToRecord acDataForm, "[Subform???]", acNewRec

    If i put in the form name i get an error saying that the form is not open (which is expected as its a subform), and im not sure or any other ways to referace to inside the subform?

    Any help would be really appreciated,
    Thanks,

    Tim Alston
    Gamalan Media Group
    ************************************************
    ***Try the following in place of "[Subform???]":

    Forms![MainFormNameHere]![SubformNameHere].Form

  3. #3
    Join Date
    Oct 2001
    Location
    Chicago
    Posts
    440
    [SubformName].SetFocus
    DoCmd.GoToRecord , , acNewRec

  4. #4
    Join Date
    Oct 2002
    Location
    UK
    Posts
    10
    Thanks so much for your quick response, its working now!

    Tim A.

Posting Permissions

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