Function File Names Class

FileNameStringAccessV2

"File Name String Microsoft Access Version 2" Abbreviate a string, producing something similar to a file name. Creates a file name similar to those created by Microsoft Access Version 2.0 when Access must create a file name associated with an object that can have a long name.

Signature (Visual Basic / VBA)

Public Function FileNameStringAccessV2( _
      ByVal vPhrase As Variant _
    , ByVal vMaxLen As Variant _
    ) As Variant

Code Example

     FileNameStringAccessV2("MSysObjects", 8) = "MSYSOBJE"
     FileNameStringAccessV2("Local Customers", 11) = "LOCAL_CUSTO"

Parameters

Parameter Description
vPhrase Phrase which is to be converted into a valid DOS file name. Function returns Null if vPhrase is Null or cannot be fixed up to a String.
vMaxLen Maximum length of the abbreviated name to be returned. Function returns Null if vMaxLen is Null or cannot be fixed up to a number.