Results 1 to 12 of 12
  1. #1
    Mmccloud64 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2016
    Posts
    6

    The Identifier [SalesPersonID] could not be found

    I downloaded an Access template and converted to a desktop application. I've made several changes to accommodate my requirements and I understand changing a table field name requires changes through out the database, which I have done. What I can't figure out is where a reference on a Macro is hiding. In the database I changed SalespersonID to EnteredBy and updated, forms, queries, reports and Macros but anytime I click on "Approve, Duplicate or Reject from a form I get this error "The Identifier [SalesPersonID] could not be found".



    When I do a debug I find the Macro (cmdApprovedQuote) stops at this line " DoCmd.RunDataMacro "Quotes.Approve"
    Most of the post I've read recommend not making changes because of these issues but there must be a solution to make this work.

    I'm guessing there is a hidden config reference somewhere and I need some direction on where to find it.

    Thanks in advance for any help you can provide.
    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    do you have a macro called: Quotes?
    in this macro is there a 'macro name' called: Approve?

  3. #3
    Mmccloud64 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2016
    Posts
    6
    Yes there's a macro called Quotes but I converted to VB so I could debug. I've gone through both VB and Macro's and change all references but yet it still comes up with an error.
    When I run debug it bombs at DoCmd.RunDataMacro "Quotes.Approve";
    ' -------------------------------------------------------------------------
    ' Save Quote data and call Approve Macro
    ' -------------------------------------------------------------------------
    DoCmd.RunCommand acCmdSaveRecord
    DoCmd.SetParameter "prmQuoteID", txtID
    DoCmd.RunDataMacro "Quotes.Approve"
    DoCmd.RefreshRecord
    DoCmd.RunMacro "Quotes.SetFormState", , ""
    TempVars.Add "AlertMessage", Eval("""Quote is now approved for invoicing.""")
    DoCmd.OpenForm "OkAlert", acNormal, "", "", , acDialog

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Would you post your dB for analysis? Do a "Compact and Repair" then Zip it.

  5. #5
    Mmccloud64 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2016
    Posts
    6

    Database for review

    See attached...
    Attached Files Attached Files

  6. #6
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    When I run debug it bombs at DoCmd.RunDataMacro "Quotes.Approve";
    The reason that it bombs here is that the submacro "Approve" doesn't exist. The macro was converted to VBA code, but the calls to the macro weren't updated to point to the VBA code.

    And it looks like too much was removed/modified in the dB. The buttons "Submit" and "Duplicate" on the form "QuoteDetail" also try to call macros that don't exist.
    I really detest macros and never use them. I've looked for over 3 hrs to find anything that says "SalespersonID"....no luck.
    What is the name of the template you used? (or post the template here)

  7. #7
    Mmccloud64 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2016
    Posts
    6
    Hi Steve,
    Yes I've spent many hours looking for the reference as well. Attached is the original template I started making my changes from.
    Northwind2010Client.zip

    Thanks for your help.

    Sorry that was the wrong attachment. See below...
    Desktop Services CLIENT.zip
    Last edited by Mmccloud64; 06-10-2016 at 10:19 AM. Reason: wrong attachment

  8. #8
    Mmccloud64 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2016
    Posts
    6
    HI Steve,
    Have you had a chance to review further? Any other ideas I can look at trying to solve this issue?

  9. #9
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I haven't been able to find a fix.

    The error I get is "[OriginalQuote].[SalespersonID] could not be found". I haven't been able to find anything remotely close to"[OriginalQuote]".

  10. #10
    Mmccloud64 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jun 2016
    Posts
    6
    Update on how to fix this issue for any one else that runs into this problem. Turns out there was a data macro that had a reference to [SalespersonID] on table Quotes. I am familiar with SQL triggers but didn't realize Access called them Data Macros or even how to add or edit one. Anyway, to edit a Data Macro see details below.
    Edit a named data macro

    1. In the Navigation Pane, double-click any table to open it in Datasheet view.
    2. On the Table tab, in the Named Macros group, click Named Macro, and then point to Edit Named Macro.
    3. In the submenu, click the data macro that you want to edit.
      Access opens the Macro Builder, and you can begin editing the macro.

      I found this article https://support.office.com/en-us/article/Create-a-data-macro-b1b94bca-4f17-47ad-a66d-f296ef834200#__toc264895171
      Which details the above instructions.
      Thanks to everyone who tried to help me with this issue, I hope this helps someone else. Had me stumped for weeks.

  11. #11
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

  12. #12
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Yes, thanks for posting the info.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 15
    Last Post: 03-11-2015, 03:43 PM
  2. Custom Unique Identifier
    By sstrode in forum Forms
    Replies: 2
    Last Post: 09-17-2014, 05:10 PM
  3. Identifier could not be found
    By Lantis in forum Programming
    Replies: 4
    Last Post: 02-29-2012, 09:14 AM
  4. generate next possible identifier
    By BayerMeister in forum Programming
    Replies: 5
    Last Post: 08-25-2010, 08:30 AM
  5. Drive type identifier
    By dcrake in forum Sample Databases
    Replies: 0
    Last Post: 08-19-2009, 04:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums