"Out of Memory" when trying to output record on one specific variable

B

bradjensmith

I receive a "Out of Memory" error in my VB module when trying to update
a table with data from an SQL query. I receive the error when trying
to output a variable
!ALTEMPLID = in_recs.Fields("ALTEMPLID").

It even errors when I just try to update !ALTEMPLID = "X"
ALTEMPLID is a text field with 255 length

Any ideas??

Here's an excerpt:

Open "C:\docs\US LOAD\CNVR_PERS_TRNSLTNfuture.txt" For Output As #1 Len
= 1500

Do While Not in_recs.EOF

If in_recs.Fields("US_CAN_IND") = "USA" Then
USCAN = "HRMS01"
Else
USCAN = "HRMS02"
End If

With out_recs
.AddNew
!EMPLID = in_recs.Fields("C.EMPLID").Value
!US_CAN_IND = in_recs.Fields("US_CAN_IND").Value
!USCAN = USCAN
!COMPANY = in_recs.Fields("C.COMPANY").Value


.Update
On Error Resume Next
End With

in_recs.MoveNext

Loop
 

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

Top