Increment a field number in a subform

johnhobbis

Registered User.
Local time
Today, 19:31
Joined
Apr 5, 2001
Messages
22
I have a subform with a field called "Visit_Number" the subform has a related childfield to the masterform
OutreachID Master(autonumber)
OutreachID child.

I need to add a record to the subform that keeps the current OutreachID (master) this works ok.
BUT I need the Visit_Number field to increment by one if a new record is added in the subform. I cannot use an auto number on the subform table because there may be more then one instance on the subform of the MasterID.

Anyone got any idea how i can increment the Visit_Number by 1 every time a record is added in the subform.

john
 
Set your OutreachID field to increment by 1 based upon your OutreachID Master field using the DMax function. If you require further help - write back.
 
Hi Carol

The OutreachID on both Master and Child (subform) are ok. But when i add a record to the SubForm i need the Visit_Number to increment by one for every record added to the SUB FORM.

Can send you over a screen shot of form if you like.
 
Hi Carol

The OutreachID on both Master and Child (subform) are ok. But when i add a record to the SubForm i need the Visit_Number to increment by one for every record added to the SUB FORM.

Can send you over a screen shot of form if you like.
 
Carol,

Am mailing you a screen shot and details,

The outreachid are ok . i just need to increment the Visit Number in the Sub Form for a patient visit the sub form might have a number of the same outreachID (patient number) depending on the number of visits.
 

Users who are viewing this thread

Back
Top Bottom