Page 1 of 4 1234 LastLast
Results 1 to 15 of 53
  1. #1
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169

    Combo Box event based on selection

    I know how to assign an event to a combo box, but I want to be able to launch a specific link, app, or email template, based on the actual selection from the combo box. So when I make a selection, whatever program or event I assign, to that specific selection, will launch. Any takers?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Can you give a specific? For instance, do you want to open Excel application only or a specific Excel workbook? Open Word only, or specific document?

    Does this help http://www.techonthenet.com/access/m.../other_app.php
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Quote Originally Posted by June7 View Post
    Can you give a specific? For instance, do you want to open Excel application only or a specific Excel workbook? Open Word only, or specific document?

    Does this help http://www.techonthenet.com/access/m.../other_app.php

  4. #4
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Although i currently only need the selection to open an email template, i assume opening any other application would be basically dOne the same way correct?

  5. #5
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Also the lInk you provided only tells u how to launch an app from a button. I want to be able to launch an app based on the selection in a combo box.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    So instead of OnClick event of a button, why not use the AfterUpdate event of the combo?

  7. #7
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Thats makes the most sense in theory, but how would you assign a sseperate email template to each of the selections in the drop down?

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    How are you building the combobox RowSource - Table/Query or ValueList? Are the templates (or paths to some file) stored in a table?

    If not in table, hard code the selection of template based on combobox choice:
    Select Case Me.comboboxname
    Case "value1"
    'code to open this template
    Case "value2"
    'code to open this template
    ...
    End Select

    I don't really know anything about email templates so not sure how to implement through code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    The values are pulled from a Table and the templates are stored on a sharepoint. So I assume I would need to use the command:
    Application.FollowHyperlink _
    "web link"

    in there somewhere.

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Perhaps you should show us some sample data, even mock up a form so that we understand what you are doing/trying to do.

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    See:
    http://msdn.microsoft.com/en-us/libr...ffice.10).aspx
    http://msdn.microsoft.com/en-us/libr...ffice.10).aspx

    The second link says use Follow method to open address that is in a control. So maybe the combobox can be multi-column, bind it to the field with path but display to users something easier to read.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #12
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    I will give it a shot and report back. Thanks.

  13. #13
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    I dont think the links are going to help in this situation. I understand combo boxes can be multi column, but the problem is that I have yet to find a way to specify specific action per selection within a drop down. Each selection will have a completely unique email template that will launch.

  14. #14
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    How about a sample as suggested in post #10?

  15. #15
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    See attached.

Page 1 of 4 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combo Box values based on preceding selection
    By speckytwat in forum Access
    Replies: 11
    Last Post: 04-27-2011, 11:35 AM
  2. Replies: 4
    Last Post: 01-24-2011, 07:11 PM
  3. Visibility based on Combo selection
    By jlclark4 in forum Forms
    Replies: 1
    Last Post: 12-22-2010, 11:42 AM
  4. Replies: 2
    Last Post: 09-17-2010, 09:53 AM
  5. Replies: 1
    Last Post: 08-26-2009, 10:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums