Results 1 to 5 of 5
  1. #1
    wtolentino is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Mar 2009
    Posts
    13

    List Box problem

    the problem that I am having was that the list box when I attempted to select does not contain any values. the list box is sourced from query.

    Click image for larger version. 

Name:	frmClassList.jpg 
Views:	11 
Size:	96.7 KB 
ID:	29407 Click image for larger version. 

Name:	emp_hdr_id.jpg 
Views:	11 
Size:	168.1 KB 
ID:	29408




    this is the query from the property sheet row source of the emp_hdr_id list box:
    Code:
     SELECT tblEmpHdr.emp_hdr_id, [tblEmpHdr].emp_fname & ", " & [tblEmpHdr].emp_lname AS emp_name
    FROM tblEmpHdr
    ORDER BY tblEmpHdr.emp_lname, tblEmpHdr.emp_fname;
    when I removed property column widths Click image for larger version. 

Name:	propertyColumnWidths.jpg 
Views:	11 
Size:	17.4 KB 
ID:	29409 it is displaying id but not the name Click image for larger version. 

Name:	withoutColumnWidths.jpg 
Views:	11 
Size:	98.3 KB 
ID:	29410. please help thank you.

  2. #2
    Preston is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2017
    Posts
    55
    When you paste that query into query design and test it, does it work?

  3. #3
    wtolentino is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Mar 2009
    Posts
    13
    Quote Originally Posted by Preston View Post
    When you paste that query into query design and test it, does it work?
    yes it works
    Click image for larger version. 

Name:	TestQuery.jpg 
Views:	10 
Size:	95.9 KB 
ID:	29411

    the problem is not with the query. the problem I think is how to display the second column from query and at the same time use the first column to save it on a table.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Change ColumnCount property to 2 as well as setting the ColumnWidths.
    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.

  5. #5
    wtolentino is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Mar 2009
    Posts
    13
    Quote Originally Posted by June7 View Post
    Change ColumnCount property to 2 as well as setting the ColumnWidths.
    it works. thanks so much.

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

Similar Threads

  1. dropdown list combo box problem
    By jhn in forum Access
    Replies: 2
    Last Post: 02-10-2017, 06:46 AM
  2. file list code problem
    By stephenaa5 in forum Programming
    Replies: 1
    Last Post: 07-03-2014, 09:58 AM
  3. Object List Problem
    By dccjr in forum Access
    Replies: 6
    Last Post: 04-18-2013, 05:21 PM
  4. List Box Problem
    By Jan11811 in forum Access
    Replies: 4
    Last Post: 04-29-2010, 07:58 PM
  5. Not in list problem
    By DanW in forum Forms
    Replies: 24
    Last Post: 11-18-2009, 03:45 PM

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