G
Guest
I have code in one place that checks the color of a person's name from many
different forms by using a with statement and a variable (MeForm) to pass the
form name, the code will execute from any form. This cuts down on duplicate
code. However, I have one subform and I can't get the proper name for it. The
parent name is "frm Inquiry" and the sub is "frm Management SubForm" and this
sub has a value called InActive and if checked the person has left the
company and the color should be blue. I need help on the syntax of assigning
the variable the full name from parent to sub form. In this situation the Me.
prefix won't work. What I have so far is this:
MeForm = "Forms![frm Inquiry].[frm Management SubForm].Form"
the with statement goes like this:
With Forms(MeForm) <- blows up on this line
if .InActive = true then
etc.
Any help would be greatly appreciated.
Sincerely,
Michael
different forms by using a with statement and a variable (MeForm) to pass the
form name, the code will execute from any form. This cuts down on duplicate
code. However, I have one subform and I can't get the proper name for it. The
parent name is "frm Inquiry" and the sub is "frm Management SubForm" and this
sub has a value called InActive and if checked the person has left the
company and the color should be blue. I need help on the syntax of assigning
the variable the full name from parent to sub form. In this situation the Me.
prefix won't work. What I have so far is this:
MeForm = "Forms![frm Inquiry].[frm Management SubForm].Form"
the with statement goes like this:
With Forms(MeForm) <- blows up on this line
if .InActive = true then
etc.
Any help would be greatly appreciated.
Sincerely,
Michael