Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    123

    Angry Unanswered: Form not found???

    I am referencing a sub form in the code of a parent form, but keep getting run-time error #2450: "Microsoft Access can't find the form..."

    In part:
    dim frm as Form
    set frm = Forms!subfrmPriceHist
    frm.RecordSource = some SQL statement

    And yes, the form is spelled correctly and listed right there in the database window. What gives?

  2. #2
    Join Date
    Apr 2003
    Posts
    280
    Why go through all the hassle to open up a form? Why don't you just use docmd.OpenForm function?

  3. #3
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Since you are referencing the subform from the parent form use
    this:

    set frm = Me!subfrmPriceHist
    or
    set frm = Forms!<ParentFormName>!subfrmPriceHist
    Inspiration Through Fermentation

  4. #4
    Join Date
    Apr 2003
    Posts
    280
    Is referencing like a subform going to show up within the parent form or something?

Posting Permissions

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