Results 1 to 5 of 5
  1. #1
    Sck is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jul 2010
    Posts
    82

    Find all selected rows in datasheet subform

    I have a datasheet view subform that lists information about a set of transactions (couple hundred) . I need the user to be able to select multiple rows (not always continuous) and press a button to build an individual reports for each of the selected lines. I know this would be easy with a listbox but the user wants to be able to sort/filter the data in the subform (like working in Excel) then select the rows they want the report for. They also need to be able to copy the all the data (filtered or not) out of the subform. I have the report build code working with a single row selected but I cant figure out how to make it loop through the subform and find all the selected rows?



    I considered having them filter the listing all the way to just the lines they want and build all the reports based on what is displayed but that is a lot more "user clicks" and I would prefer to keep it as simple as I can. (plus I am not sure I know how to make it print the full filtered list).

    As a last resort, I can add a "Make Report For:" list box but it will clutter the form because I would have to add the ability to filter (multiple criteria) what displays in the listbox - basically duplicating what is in the subform.

    Any guidance is appreciated.

    sck

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    How do you select non-continuous rows?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Sck is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jul 2010
    Posts
    82
    Quote Originally Posted by June7 View Post
    How do you select non-continuous rows?
    Bummer, in my head i was thinking you could..... that is what i get for assuming.

    either way i still need to figure out how to id the rows selected.

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    The usual way is for your recordsource to include a 'selected' field which would reside in your transactions table, or perhaps updates a variable in a form - see this link which may provide a solution

    https://www.access-programmers.co.uk...t=multi+select

    the problem with a 'selected' field in a table is if your app is multi user - you could have more than one user updating at a time

  5. #5
    Sck is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jul 2010
    Posts
    82
    Quote Originally Posted by Ajax View Post

    the problem with a 'selected' field in a table is if your app is multi user - you could have more than one user updating at a time
    thanks, I will take a look at the link. it is multi user so the selected field may well be an issue.

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

Similar Threads

  1. Replies: 10
    Last Post: 12-12-2016, 12:51 PM
  2. Replies: 2
    Last Post: 08-13-2016, 05:13 PM
  3. Replies: 8
    Last Post: 08-26-2012, 11:11 PM
  4. Replies: 2
    Last Post: 10-21-2011, 07:11 AM
  5. get data from selected datasheet row
    By Grooz13 in forum Programming
    Replies: 0
    Last Post: 03-17-2011, 01:01 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