M
Maria
Hi,
I have created a form from wich I want to append a link to file in a
table.
I have created a browse button and an action to it that looks like
follows:
Private Sub browseKnapp_Click()
Dim strFilter As String
Dim strInputBildoriginal As String
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
strInputBildoriginal = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Leta rätt på filen...", _
Flags:=ahtOFN_HIDEREADONLY)
Note that in order to call the Save As dialog box, you can use the same
wrapper function by just setting the OpenFile option as False. For
example,
'Ask for SaveFileName
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
strSaveBildoriginal = ahtCommonFileOpenSave( _
OpenFile:=False, _
Filter:=strFilter, _
Flags:=ahtOFN_OVERWRITEPROMPT Or ahtOFN_READONLY)
End Function
This is my atempt to adapt the link that were referred to in several
previous posts on this topic. However I get a complation error saying
funciton ahtAddFilterItem() isn't declared. I thought this was
functions that were built in to Access. Isn't it? Should I copy the
whole thing. I'm not quite sure how to use it. It seems like alot of
code to add to one button action.
http://www.mvps.org/access/api/api0001.htm
I have created a form from wich I want to append a link to file in a
table.
I have created a browse button and an action to it that looks like
follows:
Private Sub browseKnapp_Click()
Dim strFilter As String
Dim strInputBildoriginal As String
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
strInputBildoriginal = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Leta rätt på filen...", _
Flags:=ahtOFN_HIDEREADONLY)
Note that in order to call the Save As dialog box, you can use the same
wrapper function by just setting the OpenFile option as False. For
example,
'Ask for SaveFileName
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
strSaveBildoriginal = ahtCommonFileOpenSave( _
OpenFile:=False, _
Filter:=strFilter, _
Flags:=ahtOFN_OVERWRITEPROMPT Or ahtOFN_READONLY)
End Function
This is my atempt to adapt the link that were referred to in several
previous posts on this topic. However I get a complation error saying
funciton ahtAddFilterItem() isn't declared. I thought this was
functions that were built in to Access. Isn't it? Should I copy the
whole thing. I'm not quite sure how to use it. It seems like alot of
code to add to one button action.
http://www.mvps.org/access/api/api0001.htm