Results 1 to 8 of 8
  1. #1
    LonghronJ is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    150

    Select 1st row or "all" in datasheet

    I'm writing a procedure for users to paste rows of data to an empty form in datasheet view. Wanting to save the user a step, and afraid the user doesn't know how to paste data to a table, I'd like to select the 1st row or select top left corner (whatever this is called, which acts like selecting the first row when the table is empty), with codes that executes when the form opens, then the user just needs to press Ctrl V to paste the copied data. Does anyone know how to achieve this, selecting/highlight the first row?

  2. #2
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    when you click on the top left portion you are referring to, it hits the forms on click event. I use a similar function with the double click event on the form. I would use the double click event just the same, single click can get crazy.

    Also you may be able to perform an Insert Into Select statement to achieve this in the background.

  3. #3
    LonghronJ is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    150
    I'm not sure I'm following you, Perceptus. The process is this...the user is copying rows of data from an Excel file. When the user comes to MS Access, they will go through a switchboard type form. When the user clicks on a button of "Paste Data", it opens up a empty table via datasheet form, then when the user closes the form, it will take that pasted data and insert the data to another table. I just need a method that highlights the top left corner, or the first row, upon opening the form. That's it.

  4. #4
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    like Ctrl + A?

  5. #5
    LonghronJ is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    150
    Unfortunately Ctrl A selects all cells with formulas, so even if a cell that is blank but has formula in it will be selected as well.

  6. #6
    LonghronJ is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    150
    Crap, wrong response to the thread. Ctrl A actually works. I thought I was responding to my Excel question in another forum

  7. #7
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    no worries. remember to mark solved!

  8. #8
    LonghronJ is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    150
    Wait, isn't it Ctrl A

    Code:
    SendKeys "^A"
    It does not seem to work.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  2. Replies: 2
    Last Post: 02-27-2015, 10:03 PM
  3. Replies: 1
    Last Post: 12-28-2012, 02:54 PM
  4. Replies: 1
    Last Post: 10-08-2012, 09:01 AM
  5. ComboBox "Select" and "DLookUp"
    By witooldas in forum Forms
    Replies: 0
    Last Post: 03-23-2011, 03:31 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