Results 1 to 2 of 2
  1. #1
    JrMontgom is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2012
    Location
    Vero Beach, FL USA
    Posts
    124

    Combo Box populate with VBA

    I have a table with a field called [DateFrom]. I want to populate a ComboBox with just the years from the field [DateFrom] and I want to eliminate duplicate years fron the list. Is there a way to create a query to get unique years from the table tblAcctDetail and field [DateFrom]? I would appreciate any help, thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Combobox RowSource sql:

    SELECT DISTINCT Year([DateFrom]) AS Yr FROM tblAcctDetail;
    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.

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

Similar Threads

  1. Populate combo box based on value chosen in another combo box
    By Gary Childress in forum Database Design
    Replies: 3
    Last Post: 01-12-2013, 09:44 PM
  2. Replies: 1
    Last Post: 07-11-2012, 08:36 AM
  3. Replies: 33
    Last Post: 01-13-2012, 07:44 AM
  4. Replies: 4
    Last Post: 01-24-2011, 07:11 PM
  5. Populate Combo Box
    By wes28 in forum Programming
    Replies: 1
    Last Post: 03-04-2009, 06:45 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