Using dates

G

Guest

I have a main form that has a beginning date field and an ending date field
(and various other fields) and is used for entering in master contracts.
Then I have a subform that is used for entering in sub contracts linked to
the master contract. In the subform I have begining and ending date
fields(and various other fields). The user will enter a series of sub
contracts in the subform with various beginning and ending dates. Once the
user is done entering the sub contracts I need the most recent beginning date
and the latest ending date (which they may not be entered in in that order)
to automatically fill in the master contract beginning date field and ending
date field. Any ideas??

Thanks!
 
J

John Vinson

I have a main form that has a beginning date field and an ending date field
(and various other fields) and is used for entering in master contracts.
Then I have a subform that is used for entering in sub contracts linked to
the master contract. In the subform I have begining and ending date
fields(and various other fields). The user will enter a series of sub
contracts in the subform with various beginning and ending dates. Once the
user is done entering the sub contracts I need the most recent beginning date
and the latest ending date (which they may not be entered in in that order)
to automatically fill in the master contract beginning date field and ending
date field. Any ideas??

Thanks!

I'd suggest not storing the derived earliest-beginning date and
latest-ending date in any table AT ALL. What's to keep someone from
going back in - through this form, through *another* form, through a
table datasheet, using an update query - and "correcting" a
subcontract date field, making your main table values WRONG?

If you need the earliest and latest dates in the Subcontracts table,
use a Totals query and extract the Min and Max values directly.

John W. Vinson[MVP]
 
G

Guest

Thanks for you help. I'll try that.

John Vinson said:
I'd suggest not storing the derived earliest-beginning date and
latest-ending date in any table AT ALL. What's to keep someone from
going back in - through this form, through *another* form, through a
table datasheet, using an update query - and "correcting" a
subcontract date field, making your main table values WRONG?

If you need the earliest and latest dates in the Subcontracts table,
use a Totals query and extract the Min and Max values directly.

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