I know this seems to be a common theme but as I'm new to prgramming I'm having trouble understanding how I can do this.
I have a code:-
Private Sub Command62_Click()
Dim strFileFolderName As String
Dim cmdlgOpenFile As New clsCommonDialog
Const clngFilterIndexAll = 5
cmdlgOpenFile.Filter = "Database Files (MDB)|*.mdb|" & _
"Text Files (TXT)|*.txt|PDF Files (PDF)|*.pdf|" & _
"HTML Files (HTM,HTML)|*.htm*|All Files (*.*)|*.*"
' Set the default file type selection to "All"
' (the fifth item in the above list)
cmdlgOpenFile.ShowOpen
strFileFolderName = cmdlgOpenFile.FileTitle
Me.CADFilename = strFileFolderName
DoCmd.OpenForm "Drawings Register"
CADFilename.SetFocus
SendKeys "{F2}", True
SendKeys "{backspace 4}", True
End Sub
This lets you browse to a file name and returns that info to a field.
what I would like to do is to strip the path data into another field.
Is this possible ??
thks
I have a code:-
Private Sub Command62_Click()
Dim strFileFolderName As String
Dim cmdlgOpenFile As New clsCommonDialog
Const clngFilterIndexAll = 5
cmdlgOpenFile.Filter = "Database Files (MDB)|*.mdb|" & _
"Text Files (TXT)|*.txt|PDF Files (PDF)|*.pdf|" & _
"HTML Files (HTM,HTML)|*.htm*|All Files (*.*)|*.*"
' Set the default file type selection to "All"
' (the fifth item in the above list)
cmdlgOpenFile.ShowOpen
strFileFolderName = cmdlgOpenFile.FileTitle
Me.CADFilename = strFileFolderName
DoCmd.OpenForm "Drawings Register"
CADFilename.SetFocus
SendKeys "{F2}", True
SendKeys "{backspace 4}", True
End Sub
This lets you browse to a file name and returns that info to a field.
what I would like to do is to strip the path data into another field.
Is this possible ??
thks