Get file path and name

E

Edgar Thoemmes

Hi

I posted the following question yesterday and Allen Browne kindly answered.
I am still having trouble with this and was wondering if anyone could help. I
put all of the code from the http://www.mvps.org/access/api/api0001.htm
in a Module and called it modGetFileName. I then tried using the function
TestIt from my forms class module like this.

Private Sub Add_Link_Click()
Dim strFName As String

On Error GoTo Err_Add_Link_Click

Exit_Add_Link_Click:
Exit Sub

strFName = TestIt
Err_Add_Link_Click:
MsgBox Err.Description
Resume Exit_Add_Link_Click

End Sub

Can someone point out where I am going wrong?

TIA

___________________________________________________________________

Hi

Is there equivalent code in access to the Application.GetOpenFileName()
which I can use to assign a path and file name to a variable?

I want to use this on a form so that I can return a hyperlink to a file
without typing the whole address everytime.

TIA


Was this post helpful to you?
Reply Top





Allen Browne

1/18/2005 9:17 AM PST
Re: Get File Name and Path

In: microsoft.public.access.modulesdaovba



See:
Call Windows File Open/Save Dialog box
at:
http://www.mvps.org/access/api/api0001.htm

If you just want the user to select a hyperlink, you may be able to use:
RunCommand acCmdInsertHyperlink
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top