Results 1 to 5 of 5
  1. #1
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22

    Editing a column in a ListBox

    So I have an 11 column list box, but I need one of these columns to be editable (simply manually assigning #1-10 to each row). I can't find a way to make a ListBox editable so I'm searching for an alternative. I either need a way to control and edit a column in my table (through Forms), or use a subform which emulates the view of a listbox but still has an editable column. The problem I'm facing with the second option is that the listbox I'm currently using is very dynamic. A blank table has data added to it through a selection of Combo Boxes, and once the data is exported to a .csv it is reset. I'm running into a conflict when trying to use a subform.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I can't find a way to make a ListBox editable
    List boxes are not editable. If you have a unique field (PK field?) you could use the double click event to pop up a form to edit that field, then requery the list box.

    A blank table has data added to it through a selection of Combo Boxes, and once the data is exported to a .csv it is reset
    Q: Not sure what you mean here. Is the list box reset? How? Or do you mean the records in the table are deleted?

    A form with the record source set the same as the list box would give the same results, but allow the specific field to be edited. All other fields could be locked so they couldn't be changed.
    Last edited by ssanfu; 08-22-2014 at 03:02 PM.

  3. #3
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22
    Thank you for the reply.

    A: The query deletes all of the records from the table and also resets the AutoNumber field to start from 1

    So I've added a subform to my main form which displays the table allowing it to be edited. How do I make the subform table update every time I append a new row of data to it? And is it possible to have whatever changes I make in the subform update to the listbox which just displays the table?

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Now I am confused.

    Please explain what you are trying to do using names of the objects. Remember I have not seen your dB and do not know what you are trying to accomplish.

    So you have a main form with a sub form:
    the subform record source is: ??????
    the list box row source is : ??????


    How do I make the subform table updated everytime I append a new row of data to it?
    If I understand the question.... if you add (type in) a new record to the subform and save the new record, doesn't that record remain visible in the subform??
    If you are importing records to a table that has a subform bound to the table, you would requery the subform to see the imported records.


    And is it possible to have whatever changes I make in the subform update to the listbox which just displays the table?
    If the subform record source and the list box row source are the same (table or query), just requery the list box.
    Last edited by ssanfu; 08-22-2014 at 04:20 PM. Reason: removed a question that was answered in a previous post

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    and also resets the AutoNumber field to start from 1
    I wouldn't worry about resetting the Autonumber field....


    Below is info on primary keys/ Autonumbers that I have found:

    Use Autonumbers properly
    http://access.mvps.org/access/general/gen0025.htm

    Autonumbers--What they are NOT and What They Are
    http://www.utteraccess.com/wiki/index.php/Autonumbers

    Primary Key Tips and Techniques
    http://www.fmsinc.com/free/newtips/primarykey.asp

    Selecting the Right Primary Key in Microsoft Access
    http://www.bluemoosetech.com/microso...ial.php?jid=54

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

Similar Threads

  1. Editing a record - reselected values in listbox
    By teamcooper in forum Programming
    Replies: 5
    Last Post: 07-25-2014, 09:38 AM
  2. Listbox - Column Widths issue
    By Ganesh7299 in forum Access
    Replies: 12
    Last Post: 01-09-2014, 09:38 AM
  3. searching 2nd column in multi-column listbox?
    By RedGoneWILD in forum Programming
    Replies: 6
    Last Post: 07-07-2012, 09:21 PM
  4. Replies: 1
    Last Post: 12-08-2011, 08:03 AM
  5. Replies: 17
    Last Post: 11-24-2011, 03:37 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