you can have public variable... just define it out of any sub or function with PUBLIC word
PUBLIC strMyText as string
if you have a let's say text box on the form and you want to put that value into in....
use me.txtMyText.Value = strMyText when you open the form or when you hit the button
the ther way is to use function, which returns the value
Public Function ReturnMyValue() As String
ReturnMyValue = strMystring
and use the function as data source for that field