Results 1 to 10 of 10
  1. #1
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24

    List box move item up/down


    i have a listbox named list0. can anyone teach me how to move item up/down in listbox by using command button.
    thanks in advance.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Take a look at the attached db. Post back if you have any questions.
    Attached Files Attached Files
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24
    it help much.. thanks you very much.. i really appreciate it.. happy with this solution..

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    You're welcome. Glad to help.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24
    can you pls help me once more. i dont know why when the item i the listbox currently in first row, and i still want to click previous button, and i got error. same goes when the item currently at last row, amd i prefer to click next. based from the sample databse u gave me, it run smoothly, i dont know where should i configure. could you pls help me. thanks

  6. #6
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24
    anybody, pls solve my problem. hope anyone can solve this.. thank you

  7. #7
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Can You post the code that you are using that is producing the error and tell us on which line it errors.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  8. #8
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24
    Code:
     Dim n As Long  Me.List29.SetFocus
      n = Me.List29.ListCount - 1
    Select Case Me.List29.ListIndex
    Case Is < 1
      Me.List29.ListIndex = n
    Case Else
      Me.List29.ListIndex = Me.List29.ListIndex - 1
    End Select
    this is the example of previous button.. im not sure why the item didnt repeat to the last item since the code is right.

  9. #9
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Can you post a copy of your db in A2003 mdb format.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  10. #10
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24
    here is the sample of the database. hope u understand..
    Attached Files Attached Files

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

Similar Threads

  1. The text you entered isn't an item in the list
    By mariusvdw in forum Access
    Replies: 3
    Last Post: 05-09-2012, 11:31 AM
  2. Replies: 2
    Last Post: 04-05-2012, 08:39 PM
  3. Missing Item List in a Combo Box
    By Robbyp2001 in forum Forms
    Replies: 19
    Last Post: 12-08-2011, 08:08 AM
  4. Dropdown List: Use Each Item Once?
    By Heavy Doody in forum Access
    Replies: 1
    Last Post: 05-02-2011, 07:44 AM
  5. Can't alays select an item from a list box
    By bomber in forum Access
    Replies: 0
    Last Post: 10-16-2009, 10:01 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