Public variables are supposed to remain in memory while Access is open. That is why they are public. I frequently use this service to post values when moving between forms.
Typically at the end of a routine, I will reset the value of the variable, for example a string to "", or an integer to 0. Then when I use the code, I first check for string <> "" or integer <> 0 to make sure a new value has been taken.
If you don't want this public property, then don't reserve the memory space. Use "Dim sString As String" instead of "Public pString As String", and you will get the memory space back after your sub or function runs.
Did that help? Look up "Declaring Variables" in Access VBA.
mmcdonal
Look it up at:
http://wrox.books24x7.com