Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Maybe I'm being thick again? Your test was whether or not Dir("") = "", or in English, is Dir("") equal to a zls which is a valid question. However, the proposed was (in English) what is Dir("")?
    For me, the answer to the latter is "Access.mdb" (without quotes of course). Now that is a bit surprising
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  2. #17
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    If you use Dir("") to test for a file's existence you will get unreliable results, that was the point of my statement.

    Hence using
    Dir(NZ([FIleName],"") is not a reliable way of testing for a result.

    You need to actually check for a file name being present first, then use Dir() to check if it exists.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #18
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    think

    Dir("")

    will return something random - I get

    ?dir("")
    A97AutoColumnWidthVer21.accdb

    like you, no idea where that came from - the file is in a temporary folder and I haven't looked at it for over 3 years

    Think at the very least you need to provide a path

    And dir never returns null - best you will get is a zls

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

Similar Threads

  1. dblClick textbox to follow hyperlink
    By markjkubicki in forum Programming
    Replies: 9
    Last Post: 03-11-2022, 06:18 PM
  2. Replies: 7
    Last Post: 10-27-2021, 08:42 AM
  3. Replies: 5
    Last Post: 06-08-2020, 11:17 AM
  4. Follow Hyperlink Method
    By philip.mccollum in forum Access
    Replies: 1
    Last Post: 07-08-2015, 05:57 AM
  5. Add button to follow hyperlink in table
    By stanley721 in forum Forms
    Replies: 6
    Last Post: 06-22-2013, 08:49 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