Copy data from web (html) to access table (1 Viewer)

Leo_Polla_Psemata

Registered User.
Local time
Today, 06:08
Joined
Mar 24, 2014
Messages
364
Hi there
I have created a table with four fields, no primary Key, just 4 short text fields. Field1, Field2, Field3, Field4 .
This table is tailored to the exact same format as one web page that I copy paste data.

However, when I copy from web, i must paste in an excel, then copy from excel and paste in the access table.
This works just perfectly however I must “dapa dupa” data, bridge through excel.

If I paste directly from web to access, the result is not correct, all four fields from web, will be pasted on the first field1
one after the other. Is there any fast way/trick we could follow and copy a table from web, paste directly as it is on the access table/form ?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:08
Joined
May 7, 2009
Messages
19,230
you can use a form and capture the clipboard and put it in each field.
see this demo if it will work.
 

Attachments

  • sampleClipboard.accdb
    512 KB · Views: 208

Leo_Polla_Psemata

Registered User.
Local time
Today, 06:08
Joined
Mar 24, 2014
Messages
364
you can use a form and capture the clipboard and put it in each field.
see this demo if it will work.
Many thanks for your reply. No, it didn't work.
If you want, visit the web site of COSCO , The address is

Then just copy paste few container numbers as below, the system will return a table with data such as
Field 1 CNTR No/. Field2 CNTR Type/ Field3 Tare Weight/ Field 4 Gross Weight
I just copy paste in a simple table and (through excel) then with one update query i go on. .
Sample
BMOU2386208
CBHU4059518
CBHU4141858
CBHU4397156
CBHU4444387
CBHU4465707

If you copy paste the table to access, you see the results are not correct.
Only if you bridge through excel you get it.

It is not big deal but when i ask my colleagues to do it, i want to be as easier and faster as possible.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:08
Joined
May 7, 2009
Messages
19,230
i change the Chr(9) (tab) the Chr(10) (newLine).
see if it will work.
 

Attachments

  • sampleClipboard.accdb
    484 KB · Views: 194

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:08
Joined
May 7, 2009
Messages
19,230
i made change again so you can run the "query" on that site against All the container
and you can (one-time) copy all the rows of the returned records.
 

Attachments

  • sampleClipboard.accdb
    644 KB · Views: 203

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:08
Joined
May 7, 2009
Messages
19,230
when i inspect the "text" from clipboard, it shows that Tab (chr(9)), NewLine (chr(10)) and Carriage (chr(13)) is
present, so i delete them and replaced with pipe symbol (|).
 

Attachments

  • sampleClipboard.accdb
    488 KB · Views: 191

Leo_Polla_Psemata

Registered User.
Local time
Today, 06:08
Joined
Mar 24, 2014
Messages
364
when i inspect the "text" from clipboard, it shows that Tab (chr(9)), NewLine (chr(10)) and Carriage (chr(13)) is
present, so i delete them and replaced with pipe symbol (|).
Hi, many thanks.
Is there some limitation in the number of records ?
When i copy paste 5-6 records, it works.
When i copy paste 200 or more, (average in real life is 300 records) the whole application goes off .
I get the message that database is in inconsistent state ??
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:08
Joined
May 7, 2009
Messages
19,230
can you upload those 200 or more container number (in .txt file) and
i'll have a check, where in the code can be improved.
 

Leo_Polla_Psemata

Registered User.
Local time
Today, 06:08
Joined
Mar 24, 2014
Messages
364
can you upload those 200 or more container number (in .txt file) and
i'll have a check, where in the code can be improved.
And this txt, is the copy paste from web on the txt
 

Attachments

  • txtfromweb.txt
    20.4 KB · Views: 184

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:08
Joined
May 7, 2009
Messages
19,230
i "increase" the initial buffer of clipboard (from 64 to 32000).
 

Attachments

  • sampleClipboard.accdb
    508 KB · Views: 218

Users who are viewing this thread

Top Bottom