Copy/Paste from Excel

Discussion in 'MS Access' started by Kirek, Dec 27, 2010.

  1. Kirek

    Kirek New Member

    Joined:
    Dec 27, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I have two files that are attached. One is an excel and the other is access. My problem is I like to copy data from excel and paste them into the textbox1 and hit <Enter> to fill in the rest of the texbox2..texbox6.
    I can only do this if all the cells are filled with data. If one of the excel cells are emply access does not move my data to the corressponding texboxes.


    This is the excel spreadsheet.
    Code:
    Item                   QTY       UnitCost     Model     Saleperson   Commission 
    Bike                  1.0000      $25.00                        Tim               0.2%Skateboard      2.0000     $40.00     STR3         John
    
    Notice if the Model is empty then I have problem. If all cells are filled then there is no problem at all.

    Access form:
    Code:
    Textbox1       Textbox2         Textbox3        Textbox4      Textbox5      Textbox6
    Item                   QTY               UnitCost           Model     Salesperson     Comm
    
    I like to copy data from excel and paste into Textbox1 and Hit <Enter> to fill all the rest of the Textboxes even if there are null in other excel field. That is not happening right now. Appreciate all your help.
     

    Attached Files:

  2. apr pillai

    apr pillai New Member

    Joined:
    Dec 17, 2010
    Messages:
    16
    Likes Received:
    12
    Trophy Points:
    0
    Occupation:
    Auditor
    Location:
    India
    Home Page:
    http://www.msaccesstips.com/
    Since, your excel file is also linked to the Access database you may use and Append Query, using Excel Table as source and the Access Table as Target. This will transfer the data correctly to the Access Table.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice