Data Validation – Between Tables (1 Viewer)

Anybody have a similiar problem?

  • YES! I hope someone can answer this!

    Votes: 1 50.0%
  • Yes, I am working something closely related.

    Votes: 1 50.0%
  • No, Not working on anything related

    Votes: 0 0.0%
  • NO! I know how to do this!

    Votes: 0 0.0%

  • Total voters
    2

Cosmos75

Registered User.
Local time
Yesterday, 18:10
Joined
Apr 22, 2002
Messages
1,281
I have a Task and Sub Task Table (One Task to Many Sub-Task relationship)

Both the Task and Sub-Task have a Finish Date field.

I want to validate using Data Validation that Task Finish Date is equal (or not earlier than) to the last Sub Task Finish Date. Is there anyway to accomplish this?
 

vangogh228

Registered User.
Local time
Yesterday, 19:10
Joined
Apr 19, 2002
Messages
302
Can you put this validation requirement in the Finish Date properties for the task? >=[Subtask Finish Date]
 

Cosmos75

Registered User.
Local time
Yesterday, 18:10
Joined
Apr 22, 2002
Messages
1,281
vangogh228,

Didn't work, it said it couldn't find [Subtask Finish Date].

I used [tblSubTask]![Subtask Finish Date] .
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:10
Joined
Feb 19, 2002
Messages
43,385
In the BeforeUpdate event of the date field on the main form, use a DMax() function to find the max date for the related subtask records and compare the dates. You can cancel the update event if the date is incorrect.
 

Users who are viewing this thread

Top Bottom