Error code 2482 on Access macro

Anonymous
2025-05-16T17:34:50+00:00

I am experiencing error 2482 when trying to run an Access macro that contains a step with an expression. Macro runs fine until that step. Database is in a trusted location, but CurrentProject.IsTrusted=False. Running Windows 11 on PC.

Microsoft 365 and Office | Access | For home | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Accepted answer
  1. DBG 11,381 Reputation points Volunteer Moderator
    2025-05-16T19:27:17+00:00

    I think, with your help, I'm learning something new. I have not tried a data macro before, but it looks like exactly what I need. I will do some experimenting and get back to you later, if that is OK.

    They're all tools in your arsenal. You just need to choose the correct one to use based on your goals.

    1 person found this answer helpful.
    0 comments No comments

12 additional answers

Sort by: Most helpful
  1. Anonymous
    2025-05-16T18:18:15+00:00

    I am uncertain of the difference between saved macro and data macro. I have used the same structure in another database but with different functions. The one I sent you was one I created in an attempt to isolate the problem. All yield the same error.

    0 comments No comments
  2. DBG 11,381 Reputation points Volunteer Moderator
    2025-05-16T18:23:39+00:00

    I used DSum() in my test on a saved macro, and it works. Otherwise, you may have to use an action to loop through all the records, in a data macro, to perform the summing, I am guessing...

    0 comments No comments
  3. DBG 11,381 Reputation points Volunteer Moderator
    2025-05-16T18:36:23+00:00

    This worked for me in a data macro.

    0 comments No comments
  4. Anonymous
    2025-05-16T18:46:00+00:00

    I created a totaling query on the table (Total: Sum) and created another macro as

    SetLocVar

    Name: Test

    Expression = {Query1]!{SumOfValue1]

    Running the macro produces the same 2482 error message.

    I should note that the database is in a trusted location, but when I examine CurrentProject.IsTrusted (with macro named "AutoExec"), result is False.

    0 comments No comments