Copy data from web (html) to access table

Leo_Polla_Psemata

Registered User.
Local time
Today, 11:41
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 ?
 
you can use a form and capture the clipboard and put it in each field.
see this demo if it will work.
 

Attachments

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.
 
i change the Chr(9) (tab) the Chr(10) (newLine).
see if it will work.
 

Attachments

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

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

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 ??
 
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.
 

Users who are viewing this thread

Back
Top Bottom