Drunkenneo
Registered User.
- Local time
- Today, 13:45
- Joined
- Jun 4, 2013
- Messages
- 192
What I don't understand is why you cannot use my solution - all you have said is 'it doesn't work' without further explanation and then provide a much more complex solution to try and resolve - again without any explanation as to what the problem is other than 'it doesn't work'.
I can tell you that your srs1 loop won't work - it looks like it is in an infinite loop if i>6.
Also you are assigning to the same form values without advancing to the next row of the form recordset.
And with regards this
Form.Name = srs1!Name
Name is a reserved word so almost certain this line won't work
Finally you have two field names (Upload and Paid) which do not match to what you have supplied as data and the result you are trying to achieve also does not match the supplied required result.
Now you have supplied more information I have restated my code using your column names in your source data (with the exception of Upload and paid which is not there)
Code:SELECT iif(Dcount("[ECard]","Payment_Log","[EReference]<=" & [EReference] & "AND [contact_first_name]='" & [contact_first_name] & "' AND [contact_Last_name]='" & [contact_Last_name] & "' AND Paid=True")<=600,[contact_first_name],Left([contact_first_name],1)) AS FirstName, contact_Last_name, order_number,email_address, contact_nmuber, ecard, ereference,[upload amount] FROM Payment_log WHERE Paid = True
Thanks CJ_London it worked now relieved