Database development and training for Birmingham and the midlands
Specialists in Microsoft Access and Visual Foxpro database training and development
I am happy to hear from existing clients but I am taking no new calls.
FoxPro DefaultExt() function
The VFP DefaultExt() function returns the filename with the specified extension if it has no extension already.
For example:
would return
because the filename already has an extension.
Note that this function will assume that a filename which ends in a period does already have an extension and will not add the new extension.
If you do need to replace any existing extension then use the ForceExt function.
Note that you must not include the period in the required extension. FoxPro does not check for the validity of the name that is generated and will return a filename with a double period.
VBA equivalent
Microsoft Access does not have equivalents to these FoxPro file name commands so I wrote this library Visual Basic functions to do give me the same facilities in VBA.