And how to Increment Date in each new subForm ?

M

Mel

Woops! Forgot to include in the... How to add subForm copies Post...

Each time we copy & past the subForm we want to increment the
"Delivery Date" by 7 days.

So we have to be able to reference the last subForm item "delivery
Date" field and add 7 days to it each time we "paste" a new copy of
the subForm.

It would certainly be helpful if anyone could share a code snippit
that may get me started on this.

Some orders are entered for 52 weeks. If we can't auto-increment the
delivery date someone will have to sit and type in the delivery date
on all 52 copies of the subForm.

Thanks again for any help with this.

Mel
 
J

John W. Vinson

Some orders are entered for 52 weeks. If we can't auto-increment the
delivery date someone will have to sit and type in the delivery date
on all 52 copies of the subForm.

No. You don't.

Have a utility table named Num, with one field N, with values from 0 through
10000 or so. Have a field HowMany in your table.

Create a Query including a calculated field

DeliveryDate: DateAdd("d", 7*N, [StartDate])

with a criterion on N of < [HowMany].

Result - 52 records, with delivery dates - with *one* stored record.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top