G
Guest
Using Access 2003.
I'm using the following code to invoke a the comon open dialogue box in my
form.
The user selects a file and the file path is captured in the string
strInputFileName
I need the captured path and file name to be added to the table
'Con_DocPath' in the field 'DocumentPath'.
Unfortunately, i'm only part way there and i'm looking for some guidance
The file path is captured but i need a solution that places the captured
'strInputFileName' in the table.
Each time the user repeats the above, the new file path is added to a list
box on the form showing the selection and addition was successful.
on click sub...
Dim strFilter As String
Dim strInputFileName As String
Dim strSQL As String
'strFilter = ahtAddFilterItem(strFilter, "Word Files (*.doc)", "*.doc")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select the documents...", _
Flags:=ahtOFN_HIDEREADONLY)
strSQL = "INSERT INTO Con_DocPath (DocumentPath) "
strSQL = strSQL & "VALUES(" & strInputFileName & "');"
CurrentDb.Execute strSQL
Many thanks.
Paul.
I'm using the following code to invoke a the comon open dialogue box in my
form.
The user selects a file and the file path is captured in the string
strInputFileName
I need the captured path and file name to be added to the table
'Con_DocPath' in the field 'DocumentPath'.
Unfortunately, i'm only part way there and i'm looking for some guidance
The file path is captured but i need a solution that places the captured
'strInputFileName' in the table.
Each time the user repeats the above, the new file path is added to a list
box on the form showing the selection and addition was successful.
on click sub...
Dim strFilter As String
Dim strInputFileName As String
Dim strSQL As String
'strFilter = ahtAddFilterItem(strFilter, "Word Files (*.doc)", "*.doc")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select the documents...", _
Flags:=ahtOFN_HIDEREADONLY)
strSQL = "INSERT INTO Con_DocPath (DocumentPath) "
strSQL = strSQL & "VALUES(" & strInputFileName & "');"
CurrentDb.Execute strSQL
Many thanks.
Paul.