>Allow me to nitpick... :-)
>
>Variables are private to the method where they are initialized, unless explicitly declared local which I'm sure you know... I just wanted to make clear to the original poster- but this probably is not material to the problem.
>
True, but the important factor here is that they go out of scope and disappear when the method they're created in completes. Since both the Init and Load, where these might have been created, will have terminated when the form is running, the variable isn't there.
>
>
>>Gan, variables are local to the method where they are initialized. You can use form properties or you can use public variables to hold this data.
>>
>>HTH
>>Barbara
>>
>>>I have a form with some textboxes. When launching the form, I put a few codes to define some memory variables, eg.
>>>
>>>store space(30) to mname
>>>
>>>For that, I change the controlsource for the txtName properties to mname. However it seems that the txtName couldn't read the memory variable, and coudln't find the variable "mname".
>>>
>>>Please point me to this problem.
>>>Thanks.
>>>
>>>Gan