That's a long time between joining and your first post - glad you found a use for us
A quickie - the tags are [ CODE] [ /CODE] (without the spaces) - you can use the hash\ pound sign to insert them for you.
Anyhoo - public variables lose their values if an end statement is executed or the reset button pressed.
In anycase, I tend to use something like the below to counter any loss of variable values:
Private MyString as String
Public Function fGetMyString as String
If MyString <> "" Then
fGetMyString = MyString
fGetMyString = Forms!MyForm!MyTextBox
This way, you can't accidently clear the value or set it to something invalid (it is private - it can only be accessed via the function) plus the value is reset in the event of a crash. A bit like a poor mans class property
Glad it sorted it. BTW - (mostly because of this) END statements aren't considered very good practice - it might be an idea to search your code for any more and remove them or replace with, say, an exit sub or whatever might be appropriate