Solved

converted Macro to Code, get error

Posted on 2013-12-07
2
563 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 120

Accepted Solution

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


should be

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

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

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…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

813 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

13 Experts available now in Live!

Get 1:1 Help Now