M
MBoozer
I am trying to access automatcially insert a filename from a hyperlink field.
I have a control on my form (MSDSDocs) that is called LocalScanLink. It works
great! I also have a field called FileName on the same form. When the user
clicks on the LocalScanLink, it automatically inserts the user selected file,
usually a pdf file. However, the user then has to "manually" type in the name
of the file into the FileName field. I automated this so that the file name
and its extension (e.g. water.pdf), are automatically populated into the
filename field. However, what i get is this "MSDS.pdf#MSDS.pdf#"
I want just the "MSDS.pdf" part with no hyperlink (not the #MSDS.pdf#
part)formatting but still need to keep the LocalScanLink as a hyperlink.
Anyway to strip some of the info before the FileName field is populated? The
code on my LocalScanLink control is:
Me.LocalScanLink.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
'Command to insert hyperlink path to scanned MSDS image
If Len(Me!LocalScanLink & "") > 0 Then
Me!FileName = Me!LocalScanLink
Else
Me!FileName = Null
End If
'Code to insert LocalScankLink filename into FileName field
I have a control on my form (MSDSDocs) that is called LocalScanLink. It works
great! I also have a field called FileName on the same form. When the user
clicks on the LocalScanLink, it automatically inserts the user selected file,
usually a pdf file. However, the user then has to "manually" type in the name
of the file into the FileName field. I automated this so that the file name
and its extension (e.g. water.pdf), are automatically populated into the
filename field. However, what i get is this "MSDS.pdf#MSDS.pdf#"
I want just the "MSDS.pdf" part with no hyperlink (not the #MSDS.pdf#
part)formatting but still need to keep the LocalScanLink as a hyperlink.
Anyway to strip some of the info before the FileName field is populated? The
code on my LocalScanLink control is:
Me.LocalScanLink.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
'Command to insert hyperlink path to scanned MSDS image
If Len(Me!LocalScanLink & "") > 0 Then
Me!FileName = Me!LocalScanLink
Else
Me!FileName = Null
End If
'Code to insert LocalScankLink filename into FileName field