Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2011
    Posts
    3

    Unanswered: help with combo box

    I have a form with a combo box, which list of all my forms I would like to open a form by selecting it from the list I found this code on the bB forums and have had very little success of getting it to work correctly it list all my forms in the combo box but when I click on them. Nothing happens. Please help desperate I am using the code as is. If I need to make any changes, please advise me

    SELECT MSysObjects.Name FROM MsysObjects WHERE (Left$([Name],1)<>"~") AND
    (MSysObjects.Type)=-32768 ORDER BY MSysObjects.Name;

    Private Sub FormOpenCombo_AfterUpdate()
    stDocName = Me.FormOpenCombo
    DoCmd.OpenForm stDocName
    End Sub

    will this code work with Access 2010
    Last edited by Bigthinkor; 01-11-11 at 06:30.

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Your code and SQL statement for the combobox RowSource is all valid. Code does not run in 2007/2010 unless your database resides in a folder that has been declared a trusted location.

    To trust your folder, click:

    1. Office Button (top left)
    2. Access Options (bottom of dialog)
    3. Trust Center (left)
    4. Trust Center Settings (button)
    5. Trusted Locations (left)
    6. Add new location (button)

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Jan 2011
    Posts
    3
    Hello

    Think you for your reply. However, I am still stuck with the same dilemma if you could provide me with a solution. I would appreciate it very much. Possibly a code that will work with Access 2010

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by Bigthinkor View Post
    ..However, I am still stuck with the same dilemma...
    Meaning what, exactly? Is your file in a folder that has been declared as 'trusted/" If so the code should work for v2010! Do you have any code in your form that works?
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Jan 2011
    Posts
    3
    yes, I followed your instructions to the fullest. But no success. I was wondering if there is a incompatibility issue?. I am currently running office 2010

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •