Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Access Programming

  • 26-08-2004 07:41PM
    #1
    Closed Accounts Posts: 13


    ok folks, I'm new to VBA and well I've never really used access at all, untill now.
    In my application I want a combo box that has three different options to select from. The first one is a word document and the other 2 are pdfs. when you click on them they should open up.

    Is there a way to have a hyperlinked combo box to do this?



    As i said im new to this so my apologies if its a stupid ass question.


Comments

  • Registered Users, Registered Users 2, Paid Member Posts: 5,811 ✭✭✭jd


    sed wrote:
    ok folks, I'm new to VBA and well I've never really used access at all, untill now.
    In my application I want a combo box that has three different options to select from. The first one is a word document and the other 2 are pdfs. when you click on them they should open up.

    Is there a way to have a hyperlinked combo box to do this?



    As i said im new to this so my apologies if its a stupid ass question.


    I don't program in vba but 20 minutes of messing around and i came up with something like this..
    Private Sub Command1_Click() (or Private Sub Combo0_Change() - not sure what you mean)
    If Form_Form1.Combo0.Value = "App1" Then
     Set oApp = CreateObject(Class:="Word.Application")
           oApp.Visible = True
    
            'Open the Document
        oApp.Documents.Open filename:="D:\doc1.doc"
    
    ElseIf Form_Form1.Combo0.Value = "App2" Then
    .
    .
    .
    .
    
    


Advertisement