Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,742
    And as I suspected, the function needs to know to look at the form for the argument.
    Combining WGM's fix for null, do it this way to get rid of the 3075 error:


    =ConcatRelated("[Hive_ID]","[T_Hive_Inspection_Detail]","[Link_to_Log_Inspection_ID] = " & Nz([Forms]![F_Log_Inspection_Main].[Log_Inspection_ID],0),"[Hive_ID]",Chr(13)+Chr(10))

  2. #17
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,566
    Dave, the argument gets passed in OK?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #18
    ScubaBart is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Jul 2024
    Posts
    117
    Quote Originally Posted by davegri View Post

    =ConcatRelated("[Hive_ID]","[T_Hive_Inspection_Detail]","[Link_to_Log_Inspection_ID] = " & Nz([Forms]![F_Log_Inspection_Main].[Log_Inspection_ID],0),"[Hive_ID]",Chr(13)+Chr(10))
    It was able to work without adding the full form syntax, the error no longer shows up. Will keep this in mind for similar circumstances though.

  4. #19
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,566
    Yes, however I would generally allow the forms to do everything, but a Delete.
    If it was VBA you could test for Me.NewRecord, but as an expression, that is not possible I believe.

    You could alter the function to take that into account by passing in the frm object as well and test in there?

    Nothing to say a good function cannot have enhancements as long as it works in all situations.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #20
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    Get rid of the table level lookup fields!!!!

    You can not name the module the same as the procedure.

    this works

    Edit: oops I see gasman found that already.
    Attached Files Attached Files
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  6. #21
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,742
    Quote Originally Posted by Welshgasman View Post
    Dave, the argument gets passed in OK?
    Yes, I had to do it that way to get rid of the 3075.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Classic Allen B ConcatRelated()
    By Forbes in forum Modules
    Replies: 22
    Last Post: 05-08-2017, 08:44 AM
  2. Replies: 4
    Last Post: 01-15-2016, 08:11 AM
  3. Replies: 2
    Last Post: 07-12-2013, 06:55 AM
  4. Replies: 7
    Last Post: 01-26-2011, 08:31 PM
  5. Replies: 1
    Last Post: 08-18-2010, 02:05 PM

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