I have code that will find the number of .TXT files in a folder. I normally only process the one that is usually found in the folder, but I need to know how to process as many .TXT files as are found. Has anyone done this before? Here's the code I use to identify ONE in the folder.
Public...
I GOT IT! No syntax errors, and it INSERTS perfectly. Here's the full SQL (I had narrowed it down to two fields for simplicity earlier).
The trick is to put SINGLE quotes AROUND the double quotes, like:
'" & variable & "'
so here's my new code:
db.Execute "INSERT into...
I GOT IT! No syntax errors, and it INSERTS perfectly. Here's the full SQL (I had narrowed it down to two fields for simplicity earlier).
The trick is to put SINGLE quotes AROUND the double quotes, like:
'" & variable & "'
so here's my new code:
db.Execute "INSERT into...
Mike777: I tried:
I would say:
db.Execute "INSERT into tblAAAccidentTemp(OldAccountNumber,RejectCode) values ('123456789111','SomeString30CharactersLong')"
or:
db.Execute "INSERT into tblAAAccidentTemp(OldAccountNumber,RejectCode) values...
jiqjaq : I had tried that as well, since that's the way I used to always do my SQL. It still didn't work. That's why I've been going mental over this today. Nothing seems to work.
scriverb: I still get the SQL syntax error.
The field AN has numbers in it (which looks ok on the watch..it has quotes around it.
The field "RC" is blank on import, but it also appears like a proper text import with the quotes around it
I'm getting a syntax error on the SQL below now and after staring at it for FIVE hours now I'm about to go mental. Can someone help me please?
Public Function ParseAndStoreAADetailRecord(GFile)
On Error GoTo Err_Handler
Dim db As Database
Dim AN As String
Dim RC As String
Set db =...
Thanks Bob: I tried adding the space to after rejectcode), I tried adding it to before Values, I've tried EVERYTHING and I'm going mental here. I'll PAY someone to get this to work at this point!!!!!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.