![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi there, I have a table called AccountPeriod which has period_id, startdate, enddate, description Another tabled called JournalHeader which contains a foreign key, period_id - where you select that period to post to Another table called JournalItems which contains a link to the JournalHeader, and also a place to enter the date, JournalDate. I want to validate/constrain the JournalDate to be between the period's start and end date. Any ideas? |
#3
| |||
| |||
|
|
In article <1162244394.609732.56930 (AT) k70g2000cwa (DOT) googlegroups.com>, "Super Wasabi" <superwasabidave (AT) gmail (DOT) com> wrote: Hi there, I have a table called AccountPeriod which has period_id, startdate, enddate, description Another tabled called JournalHeader which contains a foreign key, period_id - where you select that period to post to Another table called JournalItems which contains a link to the JournalHeader, and also a place to enter the date, JournalDate. I want to validate/constrain the JournalDate to be between the period's start and end date. Any ideas? In the options for JournalDate, set Validation to "In Range" between startdate and enddate. Matt |
#4
| |||
| |||
|
|
Matt Can this range be the names of the fields? Didnt think it would accept that, I figured it was the actual dates, which I cant set becuase I dont know them, they are set per period.. :-) Dave. Matt Wills wrote: In article <1162244394.609732.56930 (AT) k70g2000cwa (DOT) googlegroups.com>, "Super Wasabi" <superwasabidave (AT) gmail (DOT) com> wrote: Hi there, I have a table called AccountPeriod which has period_id, startdate, enddate, description Another tabled called JournalHeader which contains a foreign key, period_id - where you select that period to post to Another table called JournalItems which contains a link to the JournalHeader, and also a place to enter the date, JournalDate. I want to validate/constrain the JournalDate to be between the period's start and end date. Any ideas? In the options for JournalDate, set Validation to "In Range" between startdate and enddate. Matt |
#5
| |||
| |||
|
|
Yes, pretty much everything can be expressed either as hard data, names of fields, or a combination. But, my mistake. It is not In Range you want, rather Validated by Calculation Something like If ( JournalDate < StartDate or JournalDate > EndDate ; 0 ; 1 ) Matt In article <1162298982.050469.17... (AT) k70g2000cwa (DOT) googlegroups.com>, "Super Wasabi" <superwasabid... (AT) gmail (DOT) com> wrote: Matt Can this range be the names of the fields? Didnt think it would accept that, I figured it was the actual dates, which I cant set becuase I dont know them, they are set per period.. :-) Dave. Matt Wills wrote: In article <1162244394.609732.56... (AT) k70g2000cwa (DOT) googlegroups.com>, "Super Wasabi" <superwasabid... (AT) gmail (DOT) com> wrote: Hi there, I have a table called AccountPeriod which has period_id, startdate, enddate, description Another tabled called JournalHeader which contains a foreign key, period_id - where you select that period to post to Another table called JournalItems which contains a link to the JournalHeader, and also a place to enter the date, JournalDate. I want to validate/constrain the JournalDate to be between the period's start and end date. Any ideas? In the options for JournalDate, set Validation to "In Range" between startdate and enddate. Matt |
#6
| |||
| |||
|
|
Hi there I tried this and it doesnt work, it rejects all entries.... If ( Journal Date < Journal Period::From Date or Journal Date > Journal Period::End Date; 0; 1 ) Any ideas? Dave On Oct 31, 5:23 pm, Matt Wills <I... (AT) Witz (DOT) End> wrote: Yes, pretty much everything can be expressed either as hard data, names of fields, or a combination. But, my mistake. It is not In Range you want, rather Validated by Calculation Something like If ( JournalDate < StartDate or JournalDate > EndDate ; 0 ; 1 ) Matt In article <1162298982.050469.17... (AT) k70g2000cwa (DOT) googlegroups.com>, "Super Wasabi" <superwasabid... (AT) gmail (DOT) com> wrote: Matt Can this range be the names of the fields? Didnt think it would accept that, I figured it was the actual dates, which I cant set becuase I dont know them, they are set per period.. :-) Dave. Matt Wills wrote: In article <1162244394.609732.56... (AT) k70g2000cwa (DOT) googlegroups.com>, "Super Wasabi" <superwasabid... (AT) gmail (DOT) com> wrote: Hi there, I have a table called AccountPeriod which has period_id, startdate, enddate, description Another tabled called JournalHeader which contains a foreign key, period_id - where you select that period to post to Another table called JournalItems which contains a link to the JournalHeader, and also a place to enter the date, JournalDate. I want to validate/constrain the JournalDate to be between the period's start and end date. Any ideas? In the options for JournalDate, set Validation to "In Range" between startdate and enddate. Matt |
![]() |
| Thread Tools | |
| Display Modes | |
| |