Importing Text from Excell to Access.

By Blackbird "BB" ·
Is it possible to import text containing brackets () from Excel into Access. I have no problem with the pull when I pull the data into Access and display it on a lable, but when I write it to a Record Set I get a conversion error even though the underlying table has a text field in place.

Because the Excel Files Im working with are not really DBase Friendly, I have to loop through a range of cells with this code for each separate pull

vTest = wb.Worksheets("wrkIPTV IRDsetting").Cells(R, C).Text

I've dimmed vTest as a Varient and as a String, neither helps the problem when writing to the rs.

Let strCap = CStr(vTest)

Let DRS.Fields(C).Value = strCap

The code workes fine for the first 5 columns, but chokes on the 6th with the ().

Your help much appriciate. BB.

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

What if...

by TobiF In reply to Importing Text from Excel ...

You pull either .value or .formula instead?

Collapse -

Its Working Now.

by Blackbird "BB" In reply to What if...

Thanks for taking a moment for my problem on the Holiday!!

It seems to have been some sort of timing issue.

When I write to and update each field one by one the error throws, when I write all the fields first and then update the whole record, that works. I wanted to see what was happening field by field for this test, but for the actual spread sheet this approach will definately be better.

Honestly I worked on this for hours, before posting the Question, .. and then stumbled on an anwser a couple hours later.

Thanks again, Happy Holiday. BB.

Collapse -

Good to hear

by TobiF In reply to Its Working Now.

In my part of the world there's no particular holiday, just a typical weekend that started a few hours ago. Nevertheless - Have a great holiday!

Anyway, good to hear it worked out for you.
Isn't it often like that? After you've decided to ask others for help, you find the answer yourself?

Collapse -

Yes it is.

by Blackbird "BB" In reply to Good to hear

Yes it's all to often just like that ...
The Universe has a sense of humor.

Good to meet you,
Blessings, BB.

Back to Software Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums