Edit Multi-Column Listbox Value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SandeepJagdeva
    New Member
    • Jan 2007
    • 23

    Edit Multi-Column Listbox Value

    I have a 3 column listbox in MS Access form. My problem is that I have to change some values of listbox columns without changing other column's value.

    How do I change single column value in only in the listbox not whole row?
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32645

    #2
    That will depend on the Row Source Type. Please try to describe your situation more fully before posting your question.

    Comment

    • SandeepJagdeva
      New Member
      • Jan 2007
      • 23

      #3
      Originally posted by NeoPa
      That will depend on the Row Source Type. Please try to describe your situation more fully before posting your question.
      Thanx for reply Sir.

      Row Source Type is 'Value List'.
      I try to explain my problem

      Example:-
      (Billing Form)

      _SrNo_Name_Amou nt___
      | 1 | A | | |
      | 2 | B | II |
      | 3 | C | III |
      | 4 | D | IV |
      |______________ ______ |

      This is the listbox with 3 columns. In the first column ‘Sr No.’ is Auto generated. As user fill this list, ‘Sr_No’ will add one to its last number like :-
      Code:
      Static Sr_No As Integer
      Sr_No = Sr_No + 1
      Till now everything works fine. Problem start when user delete any row from listbox. Suppose that user select third row that is “ 3 | C | III “. And hit delete button. Now my first column’s value look likes “1 > 2 > 4”. But first column should be like this “ 1 > 2 > 3”. How can I change ‘4’ to ‘3’ while other two column’s value should be same ‘D’, ‘IV’.

      If U don't understand my concept I will give U full detail of my project. But please HELP ME !!!!!!!


      Thanx in advance

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32645

        #4
        This isn't something I ever find myself doing, so I'm not very sure, but I expect the .Column() property would give you access to that value.

        Comment

        • SandeepJagdeva
          New Member
          • Jan 2007
          • 23

          #5
          Originally posted by NeoPa
          This isn't something I ever find myself doing, so I'm not very sure, but I expect the .Column() property would give you access to that value.
          U R right sir, we can access to that value by using .column() property but we can't write to this value
          As I do :-
          Code:
          Me.List0.Column(0, Me.List0.ListIndex) =3
          But Access give me this message "Run-time error '424':
          Object requied"

          Please HELP ME ??????????????? ???????/

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32645

            #6
            In that case I doubt it can be done directly. You'd need to edit the string assigned to the RowSource.

            NB. Please don't shout (use all upper-case letters) and repeating so many ? characters. The only effect it has is to irritate other members. I will help where I can, but that is all.

            Comment

            • SandeepJagdeva
              New Member
              • Jan 2007
              • 23

              #7
              Realy Good Idia. I will try and tell u about it.

              Comment

              • SandeepJagdeva
                New Member
                • Jan 2007
                • 23

                #8
                At last i Solved my problem by adding a new single column listbox for Serial No.

                Thanx for Support Mr NeoPa

                Comment

                • NeoPa
                  Recognized Expert Moderator MVP
                  • Oct 2006
                  • 32645

                  #9
                  I'm pleased to hear you solved your problem. I'm also pleased you seem to have come up with the solution by yourself in the end. We like to help, but members finding their own solutions is always a better result. Well done.

                  Comment

                  Working...