Results 1 to 14 of 14
  1. #1
    Mclaren is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2010
    Location
    Johannesburg
    Posts
    164

    selecting all records on continuous form using vb

    Is there a way to select all records on a continous form in much the same way as using ctrl + A ?



    If so, how do i go about coding it ?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What are you attempting to accomplish? The Recordset of the form contains all of the records.

  3. #3
    Mclaren is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2010
    Location
    Johannesburg
    Posts
    164
    well, this may come as no suprise, but some users do NOT know the keyboard short cuts, and have come to me asking for a way to select all records on the form for copy paste reasons. So i am including: Select all, De-select all, Copy and Paste buttons to my forms.

    Just giving the users as many options on the form as i can.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    As RuralGuy asked What are you trying to accomplish? Options for what exactly?

  5. #5
    Mclaren is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2010
    Location
    Johannesburg
    Posts
    164
    Like I said:

    I want to give the user more options with regards to selecting data for copy and paste reasons.

    Remember, WE know how to use access, some users don't. Some users don't know the key board short cuts either to select all records currently being shown on the form. I know that if it was me being the end user and using the actual database, i would know how to easily accomplish a quick Select all using ctrl and A. I may want to point out that on some forms, not all records in the underlying table are shown and that the data is the result of a filter on the form.

    My users often have to copy data from the database to excel or other applications, so i am giving the user visible options on the form to make it easier and more user friendly to use.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Maybe you should be designing some automation to handle this stuff that the users are not familiar with
    My users often have to copy data from the database to excel or other applications,

  7. #7
    Mclaren is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2010
    Location
    Johannesburg
    Posts
    164
    Automation ? Well yes i could but, I cannot say when and how much data will be copied and pasted, and to which apps. That is for the user to decide.

    Look if it cannot be done I'm cool with that, i would just like to include it.

    I am pretty sure i don't need to keep going over the why's of why i want to include this, i just need to know if it can be done or not, and; if yes, how ?

  8. #8
    Mclaren is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2010
    Location
    Johannesburg
    Posts
    164
    I think i will add a usage counter to see how often it is used, if it is not used too much or if it doesn't give users any benefit i can then remove it again.

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm pretty sure you will find that ^A does not work either.

  10. #10
    Mclaren is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2010
    Location
    Johannesburg
    Posts
    164
    yip it does, tested and confirmed working.

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    In that case then maybe simply using a SendKeys statement will suffice.

  12. #12
    Mclaren is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2010
    Location
    Johannesburg
    Posts
    164
    Ah, I know about the send keys statement but never used it, Hence I haven't thought about it, will do a bit of research.

    Thanks RuralGuy.

  13. #13
    Mclaren is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2010
    Location
    Johannesburg
    Posts
    164
    Easier than i thought:

    Code:
    DoCmd.RunCommand acCmdSelectAllRecords

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thanks for posting back with your success and solution.

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

Similar Threads

  1. Rearranging records on continuous form
    By aytee111 in forum Forms
    Replies: 6
    Last Post: 11-16-2011, 03:04 PM
  2. Selecting records within a form
    By crowegreg in forum Programming
    Replies: 29
    Last Post: 08-19-2011, 08:18 AM
  3. how to get auto numbering on continuous form records
    By shubhamgandhi in forum Programming
    Replies: 1
    Last Post: 08-04-2011, 02:26 PM
  4. Replies: 1
    Last Post: 04-02-2011, 11:55 AM
  5. Clear records off of continuous form
    By Ashe in forum Forms
    Replies: 2
    Last Post: 01-04-2011, 12:27 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