S
Sapling
I have a large number of very similar forms. I need to do the same type of
dependency check and set a status field for each of these forms. I created a
sub to do the dependency checking. I pass the name of the calling form to the
function, but when the function attempts to use that name, I get the
following error:
Run-time error '2450':
Microsoft Office Access can't find the form 'frmName' referred to in a macro
expression or Visual Basic Code.
Here is the code for the sub - the error happens on the first statement
containing frmName:
Public Sub Aquanaut_Status(frmName As String)
....
If Forms!frmName!Aqua1 = True Then
Here is the code for calling the sub:
Aquanaut_Status "AquanautFrm"
It looks to me like Access thinks frmName is the name of the form instead of
a string containing the name. I know this must be a simple syntax thing, but
I can't seem to figure it out. Can anyone please help?
Thx,
Roxanne
dependency check and set a status field for each of these forms. I created a
sub to do the dependency checking. I pass the name of the calling form to the
function, but when the function attempts to use that name, I get the
following error:
Run-time error '2450':
Microsoft Office Access can't find the form 'frmName' referred to in a macro
expression or Visual Basic Code.
Here is the code for the sub - the error happens on the first statement
containing frmName:
Public Sub Aquanaut_Status(frmName As String)
....
If Forms!frmName!Aqua1 = True Then
Here is the code for calling the sub:
Aquanaut_Status "AquanautFrm"
It looks to me like Access thinks frmName is the name of the form instead of
a string containing the name. I know this must be a simple syntax thing, but
I can't seem to figure it out. Can anyone please help?
Thx,
Roxanne