Numbering records issue

Stuart Green

Registered User.
Local time
Today, 07:07
Joined
Jun 24, 2002
Messages
108
I have a form which records whether a customer has rendered a return to me for a specific month. On this form is a sub form where I record the details of any orders. So, for example there is a one record for customer A for month 6 with many details. I need to store on the sub form the month number (in this example 6) but also the number of the sub form record. So, for example if this is the third page of details (ie third record in the sub form)the identifier would be 6/3, next detail record on the sub form 6/4 etc etc. This number has to be saved in the sub form table record at the time it is created as it may be refered to later on when searching records. Problem is a) how to do this and b) how to get over duplications should a detail (sub form)record be deleted. In the words of a drowning man....help!
 
This would be like saving calculations, therefore not recommended. even if you wanted it for a primary key, it would be a hassle to change each record if you had to delete (or whatever) record number 2 of 1000. you would have to go through all records and readjust them.

If you want to keep a gross quantity of records for the related record, do a calculation like this:

=count([YourFieldNameHere])

Put above code in a unbound text box or type it in the control source which does the same thing
 
Many thanks for the help, will try suggested route
 
Forgot to mention: I forgot to add the form reference if you need it in the main form referencing the subform.

try this:
****Edit***
=me!YourSubformName.[Form]![CalculationField]

and in your subform footer:

=count([YourFieldNameHere])
****Edit****
If that don't work use the expession builder.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom