Results 1 to 4 of 4
  1. #1
    katipiders is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2016
    Posts
    1

    Selecting records and updating a field in only those selected

    Hello,



    I have a bit of a quandary. I want to be able to select certain records in a form and update only one field in those selected records at once.

    Here’s an example,

    Say I have a list of individual invoices, but only want to apply some of those invoices to a single check. I would like to select those invoices from the list and add the same requisition number to all the selected invoices.

    So here in the below form, I want to select the first and third invoice and update the requisition field with same value, leaving the middle invoice untouched.

    Click image for larger version. 

Name:	Capture.JPG 
Views:	12 
Size:	23.4 KB 
ID:	26054

    Any thoughts?

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Listbox's allow multi-select, maybe you could change it to that, use the subform as display only.

  3. #3
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,823
    Since your picture example shows that you want to choose non-contiguous rows, you can't use the SelTop and SelLength properties of the datasheet form. I mentioned this anyway for the benefit of any future readers of your thread who might be able to use that. The suggestion to use a listbox is a good one, as long as you're OK with the number of list items it contains and how far apart they are when selecting. If there are a lot of items and I'm navigating many rows apart, I'd rather have two list boxes because since it's likely some of the chosen items will not be visible when I'm done selecting and I may not notice a mis-click. The second one is for moving the chosen list items into, then updating the necessary fields for the second set.
    Last edited by Micron; 10-06-2016 at 08:57 PM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,450
    you might find the 'multiselect' form in this thread of use


    https://www.accessforums.net/showthread.php?t=61811

    you can then have code to split the SelectedList value to run update queries

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

Similar Threads

  1. Replies: 3
    Last Post: 12-28-2015, 04:11 PM
  2. Replies: 9
    Last Post: 11-19-2015, 03:05 PM
  3. Replies: 14
    Last Post: 12-06-2012, 11:25 AM
  4. HELP for updating selected records
    By explorer19 in forum Programming
    Replies: 7
    Last Post: 06-01-2011, 01:29 PM
  5. Replies: 15
    Last Post: 11-03-2010, 02:39 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