Solved

TempVars with onload event of a form

Posted on 2015-01-04
3
117 Views
Last Modified: 2015-01-04
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?
0
Comment
Question by:SteveL13
3 Comments
 
LVL 18

Expert Comment

by:bonjour-aut
ID: 40530436
The syxtax is

TempVars.Add "myVisitFreq", me.txtVisitFrequency
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 40530440
it should be

TempVars.Add "myVisitFreq", me.txtVisitFrequency.Value
0
 

Author Comment

by:SteveL13
ID: 40530647
Yes.  It seems it needed the .Value at the end.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now