Go4Expert (http://www.go4expert.com/)
-   MS Access (http://www.go4expert.com/forums/ms-access-forum/)
-   -   Copy/Paste from Excel (http://www.go4expert.com/forums/copy-paste-excel-t24276/)

Kirek 27Dec2010 07:43

Copy/Paste from Excel
2 Attachment(s)
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.

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:

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.

apr pillai 21Feb2011 11:45

Re: Copy/Paste from Excel
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.

All times are GMT +5.5. The time now is 12:15.