Trocergian
Registered User.
- Local time
- Today, 10:39
- Joined
- Apr 6, 2009
- Messages
- 16
I'm attempting to requery a subform using a variable and running into "can't find form" errors.
Here's code that works fine when run directly:
Forms!frmDashboard!frmDwgStatusSub.Form.Requery
But when loaded into a variable and trying to run via:
Forms(gSendingForm).Requery
throws an error.
I've attempted:
gSendingForm = "Forms!frmDashboard!frmDwgStatusSub.Form"
and
gSendingForm = "frmDashboard!frmDwgStatusSub.Form"
and
gSendingForm = "frmDashboard!frmDwgStatusSub"
with no luck.
I can use Forms(gSendingForm).Requery (ex. gSendingForm = "frmDashboard") to requery any top level form so I'm guessing that command is not the problem.
What am I missing?
Here's code that works fine when run directly:
Forms!frmDashboard!frmDwgStatusSub.Form.Requery
But when loaded into a variable and trying to run via:
Forms(gSendingForm).Requery
throws an error.
I've attempted:
gSendingForm = "Forms!frmDashboard!frmDwgStatusSub.Form"
and
gSendingForm = "frmDashboard!frmDwgStatusSub.Form"
and
gSendingForm = "frmDashboard!frmDwgStatusSub"
with no luck.
I can use Forms(gSendingForm).Requery (ex. gSendingForm = "frmDashboard") to requery any top level form so I'm guessing that command is not the problem.
What am I missing?