'This may help: it is in a command code of a form in access.
private Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectoryA" (byval nBufferLength as Long, byval lpBuffer as string) as Long
private Function retThePath()
'KPD-Team 2000
'URL: http://www.allapi.net/
'E-Mail: [email protected]
Dim sSave as string
'create a buffer
sSave = string(255, 0)
'retrieve the current directory
GetCurrentDirectory 255, sSave
retThePath = sSave
End Function

private Sub Comando6_Click()
on error GoTo Err_Comando6_Click
Form.Caption = retThePath
'you could also use:
'Form.Caption = CurDir
Exit_Comando6_Click:
Exit Sub

Err_Comando6_Click:
MsgBox Err.Description
resume Exit_Comando6_Click

End Sub





Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.

The Rater