Solved

converted Macro to Code, get error

Posted on 2013-12-07
2
554 Views
Last Modified: 2013-12-07
Experts,

I have a form with an Onclick event.
The event is in the form of a macro.
It works fine.  

I converted the macro to code and now get an error on the OnClick event of that same form.  
"TempVars can only Store data.  They can not store objects"
(actually I converted the macro in another db then copied and pasted from that db to the current db as didnt want to convert all macros to code in current db...if that matters)
I didnt do anything else except convert macro to code.

posted pic.

Let me know what you think as to why I get the error.

error,After Converted to code
0
Comment
Question by:pdvsa
2 Comments
 

Author Comment

by:pdvsa
ID: 39703727
here is the macro before converted (collapsed all)

Macro, before converted
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 39703730
this
tempvars.add "CurrentID",ID


should be

tempvars.add "CurrentID", me.ID.value
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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…

932 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

18 Experts available now in Live!

Get 1:1 Help Now