Plus One

jax

Registered User.
Local time
Today, 21:52
Joined
Mar 4, 2002
Messages
61
I have a database which contains information about grant claimants.

Grant applications come in all year round.
I want the dbase users to be able to click a button which will generate a number for all those claimants who havent received their payment yet (ie put them into batches).
I have a numeric field (Batch) which is set to default value of 0.
What i want to do is for the user to click on a check box which will change all those claimants who still have a 0 next to their name to a 1, then 2, then 3 etc.

I am ok with coding the check box to change the batch field from a 0 to a 1 but I am not sure how to get it to look at the highest number stored in that field for all previous records and then add one to that highest number. This is so that each payment run has a batch number, and i can then set up reports to show how many payments were in each batch.

I hope there is a simple solution.

Thanks for your help.
 
I have solved a bit of this problem. I have used an unbound box on the form to show the maximum figure in the batch field (DMax) in the table, and then on on_click of the check box i just get it to add one to the maximum number.

My problem now is updating all the records. I can only get my code to change the first record it finds from 0 to 1 (or whatever is the next number).

How do i change all the records in the table that have a 0 in the batch field? Do i use an update query or cascade update or what - there must be a way? If so how?

Help
 

Users who are viewing this thread

Back
Top Bottom