TempVars with onload event of a form

I'm sure I'm doing this all wrong but I'm trying to set the value of a TempVar when a form opens with...

    Dim myVisitFreq As Integer
    TempVars.Add myVisitFreq = me.txtVisitFrequency

But it doesn't work.  What is wrong with it?
SteveL13Asked:
Who is Participating?
 
Rey Obrero (Capricorn1)Commented:
it should be

TempVars.Add "myVisitFreq", me.txtVisitFrequency.Value
0
 
bonjour-autCommented:
The syxtax is

TempVars.Add "myVisitFreq", me.txtVisitFrequency
0
 
SteveL13Author Commented:
Yes.  It seems it needed the .Value at the end.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.