Trouble with navigation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Phelan-Cummings

    #1

    Trouble with navigation


    Form: Main Menu

    From the Main Menu you open up the main form, “Program_servic es”
    (unbound) which serves various purposes aside from the fact that it has
    a single unbound, first, subform, “frmMain” with two option buttons.

    Button #1 opens a Calendar GRID option, which is on the, “frmMain” form;
    again is unbound.

    Button #2 opens a Registration option, which contains a, second,
    subform, “frmStatus” which is bound (tblStatus table)


    The code behind the “frmStatus” subform includes the following which
    works but only when I use it as the first subform to the, “frmMain” form
    as a main, popup, form:

    Private Sub Form_AfterUpdat e()
    RequeryAllCtls
    *Forms!frmMain. DrawGrid (The, DrawGrid is located on the first
    subform, “frmMain”, and not on the “frmStatus”.)
    End Sub

    Also, the frmStatus form also contains 4 synchronized combo boxes; all
    four boxes synch together correctly as designed.


    Problem:

    However, once I synchronize all four combo boxes to call up information
    to include in the current record, I try to navigate to another record.
    When I try to use the navigation button to move from record to record,
    when the “frmMain” form is used as the first sub form to,
    “Program_Servic es” (main form), I get the following error pointing to
    code behind the form, “frmStatus”:

    *Run-time error '2450':

    Microsoft Office Access can't find the form 'frmMain' referred to in a
    macro expression or Visual Basic code.

    My thinking was that frmMain cannot be found until the main form
    “program_servic es” was found. I tried the follow combinations; nothing
    works:

    Forms![program_service s].frmMain.DrawGr id
    Forms![program_service s]![frmMain].DrawGrid
    Forms!program_s ervices!frmMain .DrawGrid
    Forms!program_s ervices!frmMain .DrawGrid
    Forms!program_s ervices.frmMain .DrawGrid

    John


    *** Sent via Developersdex http://www.developersdex.com ***
  • MacDermott

    #2
    Re: Trouble with navigation

    When you need to post the same question to several groups (not often
    necessary, as most of the same people lurk in several groups), please put
    the names of all the groups into the same post, instead of posting to each
    group individually.
    That way, everybody will see all answers, as well. People won't be
    answering questions that someone else has already addressed. And you won't
    have to go hunting in the other groups you posted to, looking for the
    answers I've posted for you...

    "John Phelan-Cummings" <jphelan1242@ho tmail.com> wrote in message
    news:Xyb9f.73$5 u.6600@news.usw est.net...[color=blue]
    >
    > Form: Main Menu
    >
    > From the Main Menu you open up the main form, "Program_servic es"
    > (unbound) which serves various purposes aside from the fact that it has
    > a single unbound, first, subform, "frmMain" with two option buttons.
    >
    > Button #1 opens a Calendar GRID option, which is on the, "frmMain" form;
    > again is unbound.
    >
    > Button #2 opens a Registration option, which contains a, second,
    > subform, "frmStatus" which is bound (tblStatus table)
    >
    >
    > The code behind the "frmStatus" subform includes the following which
    > works but only when I use it as the first subform to the, "frmMain" form
    > as a main, popup, form:
    >
    > Private Sub Form_AfterUpdat e()
    > RequeryAllCtls
    > *Forms!frmMain. DrawGrid (The, DrawGrid is located on the first
    > subform, "frmMain", and not on the "frmStatus" .)
    > End Sub
    >
    > Also, the frmStatus form also contains 4 synchronized combo boxes; all
    > four boxes synch together correctly as designed.
    >
    >
    > Problem:
    >
    > However, once I synchronize all four combo boxes to call up information
    > to include in the current record, I try to navigate to another record.
    > When I try to use the navigation button to move from record to record,
    > when the "frmMain" form is used as the first sub form to,
    > "Program_Servic es" (main form), I get the following error pointing to
    > code behind the form, "frmStatus" :
    >
    > *Run-time error '2450':
    >
    > Microsoft Office Access can't find the form 'frmMain' referred to in a
    > macro expression or Visual Basic code.
    >
    > My thinking was that frmMain cannot be found until the main form
    > "program_servic es" was found. I tried the follow combinations; nothing
    > works:
    >
    > Forms![program_service s].frmMain.DrawGr id
    > Forms![program_service s]![frmMain].DrawGrid
    > Forms!program_s ervices!frmMain .DrawGrid
    > Forms!program_s ervices!frmMain .DrawGrid
    > Forms!program_s ervices.frmMain .DrawGrid
    >
    > John
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***[/color]


    Comment

    Working...