G
Guest
I'm using MS Access 2003
I looking for a solution that allows a user to select a file using the
CommonFileOpenSave dialogue box, then save the full path and name of that
file as a hyperlink into a table.
The following allows the user to pick the file and capture the full path in
a string variable: strInputFileName. This part works.
I need access to then place the string into a filed called DocumentPath in
the table Con_DocPath. I thought the last 3 lines of the routine would
achieve this but it does not.
The user can continue to add as many file paths as required, by repeating
this routine.
Can anyone help me resolve this?
Thanks, Paul
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 associated with
this contract...", _
Flags:=ahtOFN_HIDEREADONLY)
strSQL = "INSERT INTO Con_DocPath (DocumentPath) "
strSQL = strSQL & "VALUES(" & strInputFileName & " );"
CurrentDb.Execute strSQL
I looking for a solution that allows a user to select a file using the
CommonFileOpenSave dialogue box, then save the full path and name of that
file as a hyperlink into a table.
The following allows the user to pick the file and capture the full path in
a string variable: strInputFileName. This part works.
I need access to then place the string into a filed called DocumentPath in
the table Con_DocPath. I thought the last 3 lines of the routine would
achieve this but it does not.
The user can continue to add as many file paths as required, by repeating
this routine.
Can anyone help me resolve this?
Thanks, Paul
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 associated with
this contract...", _
Flags:=ahtOFN_HIDEREADONLY)
strSQL = "INSERT INTO Con_DocPath (DocumentPath) "
strSQL = strSQL & "VALUES(" & strInputFileName & " );"
CurrentDb.Execute strSQL