Solved

TempVars with onload event of a form

Posted on 2015-01-04
3
120 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

756 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