Results 1 to 2 of 2
  1. #1
    Tenmakk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    35

    Changing the forecolor of an item in a list

    How do I change the forecolor of a specific row in a list. I have a list filled with items that are available, and I want any items that are not available to be grayed out in the list (or 'red' in this example). My list is called lstParam. I don't have the complete code of it, but basically I want to put:


    Code:
    If lstParam.Selected(x) Then Me.lstParameter.ForeColor = vbRed
    On other sites, I've seen instructions for doing this by declaring a variable as ListItem, but I get an error every time I try this. I'm thinking ListItem must only be for VB.

  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,929
    Well, indication that ListView can be done in Access found at http://www.tek-tips.com/faqs.cfm?fid=6027

    Otherwise, use a subform or there may be some third party add-in out there somewhere.
    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. Add item to value list in list box - error
    By slochhaas in forum Forms
    Replies: 7
    Last Post: 01-31-2017, 03:22 PM
  2. Changing Forecolor on form
    By dvgef2 in forum Forms
    Replies: 7
    Last Post: 08-22-2015, 01:19 PM
  3. List box move item up/down
    By mikael in forum Access
    Replies: 9
    Last Post: 09-12-2012, 08:49 PM
  4. Replies: 2
    Last Post: 04-05-2012, 08:39 PM
  5. Replies: 2
    Last Post: 10-19-2011, 03:21 AM

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