Results 1 to 5 of 5
  1. #1
    Varda is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    44

    Question Populate Combo Box with list of Tables

    A decade ago I had a professional developer help me out with a database and I've been using the same code since then. But now with MS Access 2007 it does not seem to work.

    I have a Form, with a combo box that was populated by all the Tables Descriptions (if there was a description, otherwise it wouldn't show it).

    The combo box had the following code in the AfterUpdate: Me!sbfrmTables.SourceObject = "TableSub" & Me.FindTableNames

    And the Row Source Type had "tableDescripList" - this is the error producing problem with MS Access 2007. It does not recognize "tableDescripList" as a valid Row Source Type.



    Can someone please help me with what I should put next to Row Source Type so this combo box shows all the Tables with a Description?

    More Details:


    This is a form that had a subform on it. When one selects a table ("table description") from the combo box, it would open a subform that is named TableSubtbl...... (I had created a Form for each of the tables that had descriptions, and named each one with the prefix of TableSub...).

    The reason for this - I needed a more user-friendly input form for all the reference tables in my database. So each of the subforms was actually imitating an Excel spreadsheet so the users felt more comfortable entering new data in it.


    I would greatly appreciate any help I could get on this. It's been many years since I've done any databases. Also, please assume I do not have very deep knowledge of Access 2007.

    Thank you in advance,
    Varda

  2. #2
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Hi Varda - it may get faster help if you can zip the database and post a copy (after removing any sensitive information). If that's not possible, we can try to walk your through some diagnostics.

    It looks like FindTableNames is the name of the combo box? And you are referring to the RowSourceType property of that combo box? If so, then what is the Row Source property set to?

    You might also search in the Access 2003 version of the database for any objects or code called tableDescripList, and let us know what you find. Depending on what you find, that might refer to a table, a custom method, or some other interesting things.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Does any VBA code run? To allow Code to run in 2007/2010/2013 you need to declare the Folder as 'Trusted.'

    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) on far right
    5. Trusted Locations (left)
    6. Add new location (button)
    7. Enter Folder Name
    8. Click on Okay

    Linq ;0)>

  4. #4
    Varda is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    44

    Populate Combo Box with List of Tables

    Thank you for the help. I figured out what the problem was. I forgot to import a module to my new database, and that is where the Table Description was being referred to.

    I'm uploading the file in case anyone else ever comes across this need.

    ComboBox_RefTables.zip

  5. #5
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    That would do it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-23-2012, 10:26 PM
  2. Replies: 1
    Last Post: 07-11-2012, 08:36 AM
  3. Replies: 33
    Last Post: 01-13-2012, 07:44 AM
  4. Populate Combo Box with list of files
    By jgelpi16 in forum Programming
    Replies: 1
    Last Post: 02-22-2011, 09:28 AM
  5. List box to populate other list boxes
    By Nathan in forum Forms
    Replies: 0
    Last Post: 03-03-2009, 07:22 PM

Tags for this Thread

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