Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dialog box - retrieve path only

Status
Not open for further replies.

mrsbean

Technical User
Jul 14, 2004
203
US
I have some code which I found somwhere (I think it was mvps.org/access but not certain) that I want to tweak a little bit. I want to retrieve only the path and not a specific file. At present, it retrieves an entire file name with the full path. Can anyone instruct me how to accomplish this?

Code:
Private Sub LogFileName_DblClick(Cancel As Integer)
Dim strFilter As String
Dim strInputFileName As String

strFilter = ahtAddFilterItem(strFilter, "Log Files (*.txt)", "*.LOG")
strInputFileName = ahtCommonFileOpenSave( _
                Filter:=strFilter, OpenFile:=True, _
                DialogTitle:="Please select an input file...", _
                Flags:=ahtOFN_HIDEREADONLY)
Me.LogFileName = strInputFileName
Me.LogFileName.Requery

End Sub

MrsBean
 
Remou,

That's perfect. It appears that although I looked for a solution there originally, I didn't find it because I just didn't know how to say what I was looking for. It can be challenging to find the answer if you don't already know what it is. Thanks very much.

MrsBean
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top