form recordset

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
 
Why are you hard-coding a 6 as the record count? Wouldn't the record count vary based on the amount of each record?

Then what happens after the next set of records reaches $600? Do you go back to the full first name or change the name some other way?

Here the upload amt is going to be the same through out all the records that is 100, the table thats why can easily calculate 600, I have got the solution but if you have different solution to it, please tell me
 

Users who are viewing this thread

Back
Top Bottom