Results 1 to 5 of 5
  1. #1
    eliotchs is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    24

    ItemData from a listbox

    Hi,

    I'm trying to select a form based on a listbox item value



    if me.followup_list.itemdata(6) >21 then
    DoCmd.OpenForm "search_followup", acNormal, DataMode:=acFormAdd
    Forms!search_followup.ProviderUniqueRecord_ID = Me.Followup_list
    else
    DoCmd.OpenForm "search_followup2", acNormal, DataMode:=acFormAdd
    Forms!search_followup.ProviderUniqueRecord_ID = Me.Followup_list
    end if

    this doesn't seem to pickup itemdata(6)

    Thanks in advance
    Joe

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What is it you expect that to return? That would refer to the bound column in the 6th record in the listbox. I wonder if you're after the Column property?

    me.followup_list.Column(6)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    eliotchs is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    24
    oooh.. bound column,
    the bound coulmn is 0
    Yes I need column property...

  4. #4
    eliotchs is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    24
    thank you!!
    I changed it to if me.followup_list.column(6) >21 then...

    worked great!!!

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Excellent! Glad it worked for you.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Listbox
    By mikejames in forum Forms
    Replies: 1
    Last Post: 10-25-2011, 07:53 AM
  2. listbox help
    By imintrouble in forum Access
    Replies: 2
    Last Post: 10-20-2011, 01:53 PM
  3. Listbox Help
    By allykid in forum Programming
    Replies: 2
    Last Post: 03-30-2011, 06:17 AM
  4. Sync ListBox?
    By rosh41 in forum Forms
    Replies: 4
    Last Post: 06-21-2010, 11:12 AM
  5. Horizontal listbox - ?
    By bane in forum Forms
    Replies: 3
    Last Post: 04-20-2010, 06:48 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