Hi Cram,
I saw your post, thanks for the follow up here!
Ok...so, I think I see the issue now. The TempVars collection exists in the application's memory, so to use them, you just add a new TempVar to the collection by name. So, for example, you could create an Access Form, add 2 Button controls to that Form, and add the following code to the Click events for those buttons:
Code:
Private Sub btnSetTempVar_Click()
Application.TempVars.Add "MyVarName", "My TempVar Value"
End Sub
Private Sub btnGetTempVar_Click()
MsgBox "TempVar Value: " & Application.TempVars("MyVarName").Value
End Sub
In the above code, the btnSetTempVar_Click() method simply sets a new TempVar variable (in the TempVars collection) by calling the Add() method and passing the specific name and value for the variable that you want to set. The btnGetTempVar_Click() method gets the value of the "MyVarName" variable that I set when (I click the previous button) and shows it in a message box, by simply calling up the item by name ("MyVarName") from the TempVars collection and getting the Value property for the TempVar.
Anyway, hopefully this all makes sense and should be very easy to use in your code. But if you are still having problems, please let me know and I'll do what I can to help!
Thanks,