Looking for control to browse files

  • Follow


Hi,

I am pretty new to and unexperienced with access (2007 is the one I 
amworking with)
I have made a database (of 1 table) to record registered mail and such.

I have added a hyperlink field which contains the link to a specific 
transmittal document showing the contents of the mail item.
I have added it to the form and it works fine. If I click on the link it 
opens the (Word) transmittal file). So far so good.

What I want is a control that lets me browse for the transmittal file, 
something like a simple Open dialog

Can someone point me to the right documentation, please

TIA

Peter-Paul Jansen
Rijswijk, The Netherlands




0
Reply Peter 1/28/2010 12:15:05 PM

http://www.mvps.org/access/api/api0001.htm

You can also change it to allow for multiple files to be selected using ctrl 
click.

Mark Andrews
RPT Software
http://www.rptsoftware.com

"Peter-Paul Jansen" <ppj@eee.nl> wrote in message 
news:eoeNlOBoKHA.1544@TK2MSFTNGP06.phx.gbl...
> Hi,
>
> I am pretty new to and unexperienced with access (2007 is the one I 
> amworking with)
> I have made a database (of 1 table) to record registered mail and such.
>
> I have added a hyperlink field which contains the link to a specific 
> transmittal document showing the contents of the mail item.
> I have added it to the form and it works fine. If I click on the link it 
> opens the (Word) transmittal file). So far so good.
>
> What I want is a control that lets me browse for the transmittal file, 
> something like a simple Open dialog
>
> Can someone point me to the right documentation, please
>
> TIA
>
> Peter-Paul Jansen
> Rijswijk, The Netherlands
>
>
>
> 


0
Reply Mark 1/28/2010 12:55:23 PM


I have a command button with the following code in the "On Click" event:

Private Sub BrowseForLocation_Click()
On Error GoTo Err_BrowseForLocation_Click


    Me!ResponseLocation.SetFocus
    DoCmd.RunCommand acCmdInsertHyperlink
    

Exit_BrowseForLocation_Click:
    Exit Sub

Err_BrowseForLocation_Click:
    MsgBox Err.Description
    Resume Exit_BrowseForLocation_Click
    
End Sub


BrowseForLocation is the button name, and ResponseLocation the name of the 
hyperlink field.
Jill

"Peter-Paul Jansen" wrote:

> Hi,
> 
> I am pretty new to and unexperienced with access (2007 is the one I 
> amworking with)
> I have made a database (of 1 table) to record registered mail and such.
> 
> I have added a hyperlink field which contains the link to a specific 
> transmittal document showing the contents of the mail item.
> I have added it to the form and it works fine. If I click on the link it 
> opens the (Word) transmittal file). So far so good.
> 
> What I want is a control that lets me browse for the transmittal file, 
> something like a simple Open dialog
> 
> Can someone point me to the right documentation, please
> 
> TIA
> 
> Peter-Paul Jansen
> Rijswijk, The Netherlands
> 
> 
> 
> 
> .
> 
0
Reply Utf 1/28/2010 1:00:04 PM

Peter-Paul:

I've always used Bill Wilson's class module.  It freely available from:

http://community.netscape.com/n/pfx/forum.aspx?tsn=1&nav=libraryMessages&webtag=ws-msdevapps&tid=22415


Its very easy to use; you just copy the module into your database and then
call it with code, e.g. in the Click event procedure of a 'Browse' button,
along these lines:

    Dim OpenDlg As New BrowseForFileClass
    Dim strPath As String
    
    OpenDlg.DialogTitle = "Select File"
    OpenDlg.DefaultType = "*.doc"
    strPath = OpenDlg.GetFileSpec
    Set OpenDlg = Nothing

    If Len(strPath) > 0 Then
        Me.txtPath = strPath
    End If

In this example its set up to browse for .doc files by default, by setting
the class's DefaultType property.  The selected path is inserted into the
text box txtPath on the form.  The class does include a list of the usual
main file types by default which is available as a drop down list in the
dialogue.  Additional types can be added by setting the class's
AdditionalTypes property in the code.

Ken Sheridan
Stafford, England

Peter-Paul Jansen wrote:
>Hi,
>
>I am pretty new to and unexperienced with access (2007 is the one I 
>amworking with)
>I have made a database (of 1 table) to record registered mail and such.
>
>I have added a hyperlink field which contains the link to a specific 
>transmittal document showing the contents of the mail item.
>I have added it to the form and it works fine. If I click on the link it 
>opens the (Word) transmittal file). So far so good.
>
>What I want is a control that lets me browse for the transmittal file, 
>something like a simple Open dialog
>
>Can someone point me to the right documentation, please
>
>TIA
>
>Peter-Paul Jansen
>Rijswijk, The Netherlands

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access/201001/1

0
Reply KenSheridan 1/28/2010 1:42:07 PM

I have 3 different answers. No doubt one of them will work.

Thank you very much for the quick responses,
Mark, Mrs Ugh and Ken

Peter-Paul



"Peter-Paul Jansen" <ppj@eee.nl> schreef in bericht 
news:eoeNlOBoKHA.1544@TK2MSFTNGP06.phx.gbl...
> Hi,
>
> I am pretty new to and unexperienced with access (2007 is the one I 
> amworking with)
> I have made a database (of 1 table) to record registered mail and such.
>
> I have added a hyperlink field which contains the link to a specific 
> transmittal document showing the contents of the mail item.
> I have added it to the form and it works fine. If I click on the link it 
> opens the (Word) transmittal file). So far so good.
>
> What I want is a control that lets me browse for the transmittal file, 
> something like a simple Open dialog
>
> Can someone point me to the right documentation, please
>
> TIA
>
> Peter-Paul Jansen
> Rijswijk, The Netherlands
>
>
>
> 


0
Reply Peter 1/28/2010 2:43:11 PM

4 Replies
279 Views

(page loaded in 0.184 seconds)


Reply: