J
John Phelan
Form: Main Menu
From the Main Menu you open up the main form, “Program_services†(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_AfterUpdate()
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_Services†(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_services†was found. I tried the follow combinations; nothing works:
Forms![program_services].frmMain.DrawGrid
Forms![program_services]![frmMain].DrawGrid
Forms!program_services!frmMain.DrawGrid
Forms!program_services!frmMain.DrawGrid
Forms!program_services.frmMain.DrawGrid
John
From the Main Menu you open up the main form, “Program_services†(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_AfterUpdate()
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_Services†(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_services†was found. I tried the follow combinations; nothing works:
Forms![program_services].frmMain.DrawGrid
Forms![program_services]![frmMain].DrawGrid
Forms!program_services!frmMain.DrawGrid
Forms!program_services!frmMain.DrawGrid
Forms!program_services.frmMain.DrawGrid
John