Solved

TempVars with onload event of a form

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 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