Line Input

B

Bob Barnes

line input# will pull in a WHOLE line into one variable, and then you must
write your own code to parse out the data....

Tips on how to handle any comma, apostrophe, double-quotes with a pair of
double-quotes?? IE...

"Fred","Smith", "Fred's info"
"John","Jones", "John's info
with a return in it"

...or..


"Bob Smith","Acme's "Clothes", Inc."

I use code like..
Open "C:\Bob\" & Y For Input As iNumOne
Set Z = CurrentDb
Set RS = Z.OpenRecordset("FromCSV")
Do Until EOF(iNumOne)
Input #iNumOne, vSvc, vCust, vTypeSvc, vInvV, vStore, vQty '---> Declared
at top of module
With RS
.AddNew
!SvcDate = vSvc: !Cust = Trim(vCust): !TypeSvc = Trim(vTypeSvc)
!InvVesco = Trim(vInvV): !Store = Trim(vStore): !QTY = Trim(vQty)
.Update
End With
Loop



TIA - Bob
 
B

Bob Barnes

Albert - We discussed this recently.

It will give me some interesting code-testing.

Any other thoughts on trapping a carriage return/ linefeed..I can let the
User know there's a text file carriage return/ linefeed with "...subscript
out of range.."

Thank you - Bob
 
A

Albert D. Kallal

Any other thoughts on trapping a carriage return/ linefeed..I can let the
User know there's a text file carriage return/ linefeed with "...subscript
out of range.."

I not sure what you mean by above?

Line Input will pull all data until the end of the line......
 
B

Bob Barnes

Albert - We had discussed the problem w/ a carriage return because it forces
a new line.

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top