Automatically add number...

frankbutcher

Registered User.
Local time
Today, 00:35
Joined
Aug 6, 2004
Messages
192
All
I have a form with a sub form on it.
Through a few combo boxes on the form (f_MaterialList), the user picks an item they need, clicks the "add" button and it adds it to the sub form ( f_MOF_S
ub)


On the sub form, they are 4 fields (amongst others), "ProjectNo", "MOF", "Sku and "Submitted".


The "Sku" field is the field that is copied from the form to the sub form.

On the form there are 2 text boxes (ProjectNo) and (MOF) that are filled in and also copied over to the sub form.
The "MOF" field is the Material Order Form number.




On the form, there is a button which when pressed, creates a material order form (The MOF field is the number), files it and ticks the "submitted" check field on the sub form.

What I a, trying to do is for the "MOF" field on the field to
be automatically filled in so, for example,

If there if has not been a form created, it would give a MOF number of 001
If form 001 had been created but not submitted, it still give a MOF number
001
If form 001 had been created and submitted, it would give a MOF number of 002
If form 002 had been created and submitted, it would give a MOF number of 003
etc etc...

If the user submitted the form every time they created one, it would be an auto number, but the user may choose to add additional items to the form and submit at a later date, so it needs to be the current form...

I hope this makes sense and can anyone help?

Thanks for reading.

Frank
 
Last edited:
You can do this sort of thing using the Dmax() function +1 Have a look at the attached for an example.
 

Attachments

Users who are viewing this thread

Back
Top Bottom