R
robert d via AccessMonster.com
I have a form that shows the history of a project. This history form can be
opened from a number of other forms. The form that calls the history form
sets a global variable:
CallingProposalForm = Me.Name
In a non-form code module I have the following:
Public CallingProposalForm As String
When the history form opens, the following line of code executes and this is
the one experiencing the problem:
If Nz(Forms(CallingProposalForm).Parse0, "") <> "(All)" Then
Parse0 is a hidden textbox on CallingProposalForm that contains the selection
made from a Treeview on that form. The value of Parse0 tells the history
form what to display.
When the code breaks on this line, I can clearly see that the value of
CallingProposalForm is correct. Parse0 is definately a hidden textbox on
the calling form.
I'm wondering if the problem occurs because the global module is defined as a
String. Do I instead need to define it as a forms object. I could test this
but I' m looking for advice on a good practice for handling passing form
names from one form to another.
Thanks.
opened from a number of other forms. The form that calls the history form
sets a global variable:
CallingProposalForm = Me.Name
In a non-form code module I have the following:
Public CallingProposalForm As String
When the history form opens, the following line of code executes and this is
the one experiencing the problem:
If Nz(Forms(CallingProposalForm).Parse0, "") <> "(All)" Then
Parse0 is a hidden textbox on CallingProposalForm that contains the selection
made from a Treeview on that form. The value of Parse0 tells the history
form what to display.
When the code breaks on this line, I can clearly see that the value of
CallingProposalForm is correct. Parse0 is definately a hidden textbox on
the calling form.
I'm wondering if the problem occurs because the global module is defined as a
String. Do I instead need to define it as a forms object. I could test this
but I' m looking for advice on a good practice for handling passing form
names from one form to another.
Thanks.