Results 1 to 6 of 6
  1. #1
    Eddy Sincere is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2014
    Location
    Carson City, NV
    Posts
    114

    Is a combo box like using a lookups?

    I'm designing a database which does not use lookup fields but uses combo boxes on the forms. However, I am wondering if I'm using them correctly. When I set up the combo box the row source is automatically filled with a what looks like a query statement (see Attachment 1).

    Attachment 1


    Click image for larger version. 

Name:	ComboBoxQuery01.PNG 
Views:	16 
Size:	8.0 KB 
ID:	17878


    Or, after the combo box is set up, I can change the row source to point directly to the table and delete the query statement which seems more efficient (see Attachment 2). However, it also looks suspiciously like a lookup field.

    Attachment 2
    Click image for larger version. 

Name:	ComboBoxNoQuery01.PNG 
Views:	16 
Size:	7.8 KB 
ID:	17879

    So, the question is: Which version is correct? Or, are they both correct and it doesn't really matter how the row source is populated?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    Yes, that is exactly what a combobox is for.

    If you point directly to the table then all fields are retrieved. The SQL statement limits to just the necessary field(s).
    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
    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
    And no, that is not a Table-level Lookup Field, which should be avoided! Go here

    www.mvps.org/access/lookupfields.htm

    for an explanation of why Table-level Lookup Fields should be avoided.

    Linq ;0)>

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I can change the row source to point directly to the table and delete the query statement which seems more efficien
    No it is not more efficient.

    If you set the row source to a table, you cannot sort the data and cannot limit the records returned to a specific sub set.
    If you have a table of names and addresses, using a table as the row source, you would see all of the names and states. If you wanted to just see the names in the state of Washington, a query (SQL) would be able to limit the records returned and have the names sorted.

    My combo boxes always have a query (SQL) as the row source - except if the table only has a few records (under 5).

  5. #5
    Eddy Sincere is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2014
    Location
    Carson City, NV
    Posts
    114
    Thanks for the answers! My question was answered and the issue resolved.

  6. #6
    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
    Glad we could help!

    Good luck with your project!

    Linq ;0)>

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

Similar Threads

  1. Lookups, queries, and combo boxes, oh my
    By MGustin in forum Access
    Replies: 2
    Last Post: 12-04-2013, 12:46 AM
  2. Use or not Use Multivalued Lookups
    By bradjake8 in forum Access
    Replies: 1
    Last Post: 08-05-2013, 05:05 PM
  3. Problem with lookups
    By Beachbum in forum Database Design
    Replies: 1
    Last Post: 02-01-2012, 12:22 AM
  4. No Lookups in a Table
    By oleBucky in forum Database Design
    Replies: 9
    Last Post: 03-23-2011, 01:40 PM
  5. Access ADP & Lookups
    By sql_dan in forum Access
    Replies: 0
    Last Post: 06-09-2010, 04:25 AM

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