Results 1 to 4 of 4
  1. #1
    hellind is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    2

    Some string error in function, object no defined.

    I have attached a strip down database. Try to query [query_dt_volume1]

    It is simple query, calling the function in module: CustomSplit.

    I want Output should be:
    <blank> = <blank>
    <blank> = <blank>
    Tower Records [USA] = Tower Records
    Deutsche Bank [Hong Kong] = Deutsche Bank


    HongKong Fund = HongKong Fund


    Why am I getting the error in this function: CustomSplit

    I have commented the code, if you have your code it will be great too. I went for the SPLIT function because it is simple. Seems like the error happens in the first two records where the entity is blank. Tried all variations of checking.
    Attached Files Attached Files

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Try this one that uses the Nz() function.
    Attached Files Attached Files

  3. #3
    hellind is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    2
    Thank you very much. It worked.

    For the first two records, without using NZ(), was an empty string been passed over? What is happening?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    It was probably a Null rather than an empty string.

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

Similar Threads

  1. Application-defined or object-defined error
    By SYFYLADY in forum Access
    Replies: 4
    Last Post: 03-05-2014, 05:25 PM
  2. Replies: 1
    Last Post: 03-14-2013, 12:39 PM
  3. Compile Error Sub or function not defined
    By Ray67 in forum Reports
    Replies: 3
    Last Post: 07-02-2012, 04:11 PM
  4. Application-defined or object-defined error
    By hawkins in forum Access
    Replies: 6
    Last Post: 07-01-2011, 01:57 PM
  5. Compile error. Sub of function not defined
    By plavookins in forum Reports
    Replies: 7
    Last Post: 04-22-2011, 10: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