CrimsonDiva
Programmer
Hi,
I'm trying to iterate through two arrays. The 1st array contains values from the database. The 2nd array contains values from a form. I want to hold the 1st array constant while checking values from the 2nd array against it. If the item in the 2nd array is not found in the 1st array, then i want to add a record to the database. I have run into several problems trying to execute this. Here is some of my code:
'comments
'1st array = dbArrary(usercount)
'2nd array = newPrefArray(chkcount)
For i = 1 to chkcount
For j = 1 to usercount
If newPrefArray(i) = dbArray(j) Then countmatch = true
If countmatch = false Then
'add record
End If <== this IF statement should only execute ONCE during this inner FOR loop
Next
Next
I'm trying to iterate through two arrays. The 1st array contains values from the database. The 2nd array contains values from a form. I want to hold the 1st array constant while checking values from the 2nd array against it. If the item in the 2nd array is not found in the 1st array, then i want to add a record to the database. I have run into several problems trying to execute this. Here is some of my code:
'comments
'1st array = dbArrary(usercount)
'2nd array = newPrefArray(chkcount)
For i = 1 to chkcount
For j = 1 to usercount
If newPrefArray(i) = dbArray(j) Then countmatch = true
If countmatch = false Then
'add record
End If <== this IF statement should only execute ONCE during this inner FOR loop
Next
Next