N
newkid
Hi everyone,
I have a table called ACH that I search for a customer id and find out
if that customer has passthru, upload or application. Each customer
can have both passthru and application. If they have both, they will
be in seperate records.The customer table has two fields. One for
Passthru and one for application. If pasthru or upload is located, I
open the Customer table and mark the passthru or application TRUE.
Here's the problem. I'm using findnext customer id as my search within
a loop. So of course I'm getting locked in an infinate loop.
Could someone help me get out of the infinite loop or I'm open to a
completely new way of locating the records in the ach table.
With rsACH
.MoveFirst
.FindFirst "[Customer ID] = " & lngCustomer & ""
Do Until rsACH.EOF = True
If rsACH![UploadOrApp] = "PassThru" Or rsACH!
[UploadOrApp] = "Upload" Then
Set rsCustomer = dbType.OpenRecordset("Customer",
dbOpenDynaset, dbSeeChanges)
With rsCustomer
.FindFirst "[Customer ID] = " & lngCustomer & ""
.Edit
![ACH File Upload] = True
.Update
End With
Else
If rsACH![UploadOrApp] = "Application" Then
Set rsCustomer = dbType.OpenRecordset("Customer",
dbOpenDynaset, dbSeeChanges)
With rsCustomer
.FindFirst "[Customer ID] = " & lngCustomer & ""
.Edit
![ACH Application] = True
.Update
End With
End If
End If
rsACH.FindNext "[Customer ID] = " & lngCustomer & ""
Loop
End With
rsACH.Close
rsCustomer.Close
Thank all!
I have a table called ACH that I search for a customer id and find out
if that customer has passthru, upload or application. Each customer
can have both passthru and application. If they have both, they will
be in seperate records.The customer table has two fields. One for
Passthru and one for application. If pasthru or upload is located, I
open the Customer table and mark the passthru or application TRUE.
Here's the problem. I'm using findnext customer id as my search within
a loop. So of course I'm getting locked in an infinate loop.
Could someone help me get out of the infinite loop or I'm open to a
completely new way of locating the records in the ach table.
With rsACH
.MoveFirst
.FindFirst "[Customer ID] = " & lngCustomer & ""
Do Until rsACH.EOF = True
If rsACH![UploadOrApp] = "PassThru" Or rsACH!
[UploadOrApp] = "Upload" Then
Set rsCustomer = dbType.OpenRecordset("Customer",
dbOpenDynaset, dbSeeChanges)
With rsCustomer
.FindFirst "[Customer ID] = " & lngCustomer & ""
.Edit
![ACH File Upload] = True
.Update
End With
Else
If rsACH![UploadOrApp] = "Application" Then
Set rsCustomer = dbType.OpenRecordset("Customer",
dbOpenDynaset, dbSeeChanges)
With rsCustomer
.FindFirst "[Customer ID] = " & lngCustomer & ""
.Edit
![ACH Application] = True
.Update
End With
End If
End If
rsACH.FindNext "[Customer ID] = " & lngCustomer & ""
Loop
End With
rsACH.Close
rsCustomer.Close
Thank all!