A
Abbey Normal
I downloaded the File Picker routine from Ken Getz:
http://www.mvps.org/access/api/api0001.htm and put it into my database. this
is called when the users clicks a cmd button so they can pick a file. the
result of this pick should be put into a text box on the same form, so it
can be saved in the database. If I debug it, I see where the TestIt function
gets the right result, but how do i get that information into the TextBox?
(called PicPath) I actually have 3 access books and I'm still getting
nowhere. Any help offered would achieve hero status for at least 24hours!
Thank you.... here is the code:
Function TestIt()
Dim strFilter As String
Dim lngFlags As Long
Dim strInputFileName As String
'Modified 5/3/5 AMc
strFilter = ahtAddFilterItem(strFilter, "Jpeg Files (*.jpg)", "*.JPG")
'strFilter = ahtAddFilterItem(strFilter, "Gif Files (*.gif)", "*.GIF")
'strFilter = ahtAddFilterItem(strFilter, "Text Files (*.txt)", "*.TXT")
'strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
strInputFileName = ahtCommonFileOpenSave(InitialDir:="C:\", _
Filter:=strFilter, FilterIndex:=3, Flags:=lngFlags, _
DialogTitle:="Please Choose Your File:")
' Since you passed in a variable for lngFlags,
' the function places the output flags value in the variable.
MsgBox " " & strInputFileName & " from TestIt"
TestIt = strInputFileName
Debug.Print Hex(lngFlags)
End Function
http://www.mvps.org/access/api/api0001.htm and put it into my database. this
is called when the users clicks a cmd button so they can pick a file. the
result of this pick should be put into a text box on the same form, so it
can be saved in the database. If I debug it, I see where the TestIt function
gets the right result, but how do i get that information into the TextBox?
(called PicPath) I actually have 3 access books and I'm still getting
nowhere. Any help offered would achieve hero status for at least 24hours!
Thank you.... here is the code:
Function TestIt()
Dim strFilter As String
Dim lngFlags As Long
Dim strInputFileName As String
'Modified 5/3/5 AMc
strFilter = ahtAddFilterItem(strFilter, "Jpeg Files (*.jpg)", "*.JPG")
'strFilter = ahtAddFilterItem(strFilter, "Gif Files (*.gif)", "*.GIF")
'strFilter = ahtAddFilterItem(strFilter, "Text Files (*.txt)", "*.TXT")
'strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
strInputFileName = ahtCommonFileOpenSave(InitialDir:="C:\", _
Filter:=strFilter, FilterIndex:=3, Flags:=lngFlags, _
DialogTitle:="Please Choose Your File:")
' Since you passed in a variable for lngFlags,
' the function places the output flags value in the variable.
MsgBox " " & strInputFileName & " from TestIt"
TestIt = strInputFileName
Debug.Print Hex(lngFlags)
End Function