Results 1 to 13 of 13
  1. #1
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038

    Cannot locate form reference in embedded macro

    Experts:



    I need some help with identifying a form reference in an embedded macro. The attached database contains the following:

    - Several tables and queries
    - Two macros (YES -- I WANT TO KEEP THESE AND NOT CONVERT THEM INTO VBA)
    - Four (4) forms

    Before going into some details, allow me to recap the process for form "F10_StaffMemberList"... this one works great!

    Process:
    - Open "F10_StaffMemberList"
    - In the top right, there's "search box"... enter, e.g., "Eastwood" and press ENTER
    - The form then only shows the record for Clint Eastwood... great!

    What I Need Some Help With:
    - I mimicked the process "F10_StaffMemberList" and replicated it in "F20_BilletList"
    - Once I open the form and enter, e.g., "Analyst", the search results an error indicating that "F10_StaffMemberList" is not referenced.
    - Next, when clicking OK, reference to the macro is made with same error

    I attempted the following:
    - In design mode of "F20_BilletList", I reviewed any events in the Search box (I didn't see any... nor did I see any in the working form "F10_StaffMemberList"
    - Next, in field [BilletIDpk], I reviewed the "Embedded Macro". Unless I overlooked it, I also did not see any reference to "F10_StaffMemberList" which should -- if available -- be changed to "F20_BilletList"
    - I did the same for field [txtOpen]... again, unless I overlooked it, I didn't see a reference that should be changed from "F10_StaffMemberList" to "F20_BilletList"

    My question:
    I'm sure the answer is very simple as (I believe) the search box requires a simple form reference update.
    Since I couldn't locate it, does anyone know what needs to change and where do I find the reference? I'd welcome if you please could attached an image so that I can easily locate it.


    Again, I do NOT want to convert the embedded macro into VBA.

    Thank you,
    EEH
    Attached Thumbnails Attached Thumbnails SearchBox.JPG   Macro.JPG  
    Attached Files Attached Files

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    It's in the macro that runs when you click on the search button, about half way down. The macro's name is Search.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    Am I changing something in the embedded macro in F20_BilletList or do I change something in "SearchBillets"? I am still not finding it.

    Pls keep in mind that "Search" is affiliated with "staff members" and "SearchBillets" with "billets".

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by skydivetom View Post
    Pls keep in mind that "Search" is affiliated with "staff members" and "SearchBillets" with "billets".
    You may intend it to be, but it is still associated with the billets form.
    Attached Thumbnails Attached Thumbnails MacrosAreYucky.jpg  
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    Paul:

    Thank you... using macros is new to me, but I like how they work.

    Thanks for the posting the image. I looked up the control "Search.ClearFilter" and then added SearchBillets.ClearFilter". Still no luck. This is frustrating.

    Is there another location that where I need to replace "Search" with "SearchBillets"?

    Does the form work in the sample database for you? If so, would you mind reposting it?

    Thanks,
    Tom

  6. #6
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    Paul... I found it. Thank you for the information. I finally got this to work... SWEET!!!


  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help. You are in the minority preferring macros to VBA.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    Paul... sorry... I was in the wrong form. It still doesn't work for "billets". Again, if this works in your version of the database, would you pls be willing to post it?

    Sorry... long day here.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Just about dinner time here and I've shut down my computer. I didn't test once I saw it was running the wrong macro. I'll try to look later tonight if you haven't solved it, but there is wine opened...
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    Dinner and wine comes first!

    Unfortunately, it is still NOT working for billets. Any additional help would be truly appreciated.

    Cheers,
    Tom

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The search macro is still being called. After far too much effort, I now see you have stacked controls on top of one another next to the search textbox. One of them still calls the search macro instead of the searchbillets macro.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    Thank you, Paul... I found the reference. Once changed, the search in billets worked just fine. Appreciate your support.

    Cheers,
    Tom

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help Tom!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 12-03-2013, 01:38 PM
  2. Embedded macro on form
    By trout in forum Macros
    Replies: 7
    Last Post: 07-09-2013, 01:13 PM
  3. Replies: 2
    Last Post: 06-30-2013, 09:59 AM
  4. Replies: 3
    Last Post: 02-15-2013, 03:36 PM
  5. Replies: 0
    Last Post: 07-13-2010, 07:45 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