Error 2482 (1 Viewer)

luzz

Registered User.
Local time
Today, 08:47
Joined
Aug 23, 2017
Messages
346
Hi all, i am facing error when i try to save and run the my macro in returning me the date and time stamp when i save a recor.

Below is my screenshot
 

Attachments

  • Error.png
    Error.png
    30.4 KB · Views: 537

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:47
Joined
Feb 28, 2001
Messages
27,005
Error 2482 is reporting the inability to find something that you named. The first thing you should do is check the spelling of every referenced item in the macro AND in things called by the macro line in question. Remember that if you are calling a function of some sort, that function can have further sub-structure.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:47
Joined
May 7, 2009
Messages
19,175
if you are executing the macro
from a Form, include those fields
in the form. Hide them by setting
their Visible Property to No.
 

luzz

Registered User.
Local time
Today, 08:47
Joined
Aug 23, 2017
Messages
346
if you are executing the macro
from a Form, include those fields
in the form. Hide them by setting
their Visible Property to No.

I did include, but it still does not work.
 

Attachments

  • Untitled.png
    Untitled.png
    4.7 KB · Views: 322

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:47
Joined
Feb 28, 2001
Messages
27,005
I looked up the SetValue action for a macro and I think I've got this figured out.

https://msdn.microsoft.com/en-us/library/bb177384(v=office.12).aspx

The problem is that the context of the action isn't inside the form (apparently) so those controls don't exist locally. This means you need to qualify the location of the variable. See the MSDN article's description of how you need to do this.

Something like Forms!formname!controlname will be required for each control reference.
 

Users who are viewing this thread

Top Bottom