astraltango
Programmer
ok, I have two forms: Form1 and Form2
I want to set a puiblic variable (str1) in Form1 from Form2. Works fine if I use the following:
Forms!Form1.str1 = "blah"
BUT, I need to do this dynamically where the form name is in a variable. For this I need the eval function right? But this does not seem to work despite there being no errors:
str2 = "Form1"
Eval "Forms!" & str2 & ".str1 = ""blah"""
In fact, I've found that not even this will work:
Eval "Forms!Form1.str1 = ""blah"""
Any ideas how I can accomplish this?
I want to set a puiblic variable (str1) in Form1 from Form2. Works fine if I use the following:
Forms!Form1.str1 = "blah"
BUT, I need to do this dynamically where the form name is in a variable. For this I need the eval function right? But this does not seem to work despite there being no errors:
str2 = "Form1"
Eval "Forms!" & str2 & ".str1 = ""blah"""
In fact, I've found that not even this will work:
Eval "Forms!Form1.str1 = ""blah"""
Any ideas how I can accomplish this?