Question Locked

Importing Text from Excell to Access.

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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.

5 replies

by tobif

You pull either .value or .formula instead?

by blackbird "bb"

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.

by tobif

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?

by blackbird "bb"

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

Good to meet you,
Blessings, BB.

This discussion is closed to new replies.