J
jean
Hi
I have 2 tables
First one is name TblPeriods containing 3 fields "PeriodNo" (Number
format from 1 to 12) "PeriodStart" (Date format dd/mm/yy) and
"PeriodEnd" (Date format dd/mm/yy)
1 01/05/12 31/05/12
2 01/06/12 30/06/12
3 01/07/12 31/07/12
and so on. PeriodStart is the first day of the mont and PerioEnd is
the last
The PeriodNo is always 1 to 12 but 1 can represent January or May or
any other month
Second table named "Oracle" contains only 2 fields "Description" (Text
format) and "ItemDate" (Date format dd/mm/yy)
I am trying create a formula with dlookup
I want to put table "Oracle" in a query (2 fields) and create a third
one that will be a lookup of the table period
Lets say for one record the ItemDate is 15/05/12 the calculate field
shoud return 1
If the ItemDate is 01/07/12 calculate field should return 3
1 for 31/05/12
2 for 18/06/12
and so on
In text the formula shoud say
Take the date of the ItemDate and return the PeriodNo of the table
TblPeriod that match
Something like =Dlookup("PeriodNo","TblPeriods", "ItemDate >=
PeriodSart and <= PeriodEnd)
I have try many different style (with " and [ ],without them) but no
success
Thanks for helping
I have 2 tables
First one is name TblPeriods containing 3 fields "PeriodNo" (Number
format from 1 to 12) "PeriodStart" (Date format dd/mm/yy) and
"PeriodEnd" (Date format dd/mm/yy)
1 01/05/12 31/05/12
2 01/06/12 30/06/12
3 01/07/12 31/07/12
and so on. PeriodStart is the first day of the mont and PerioEnd is
the last
The PeriodNo is always 1 to 12 but 1 can represent January or May or
any other month
Second table named "Oracle" contains only 2 fields "Description" (Text
format) and "ItemDate" (Date format dd/mm/yy)
I am trying create a formula with dlookup
I want to put table "Oracle" in a query (2 fields) and create a third
one that will be a lookup of the table period
Lets say for one record the ItemDate is 15/05/12 the calculate field
shoud return 1
If the ItemDate is 01/07/12 calculate field should return 3
1 for 31/05/12
2 for 18/06/12
and so on
In text the formula shoud say
Take the date of the ItemDate and return the PeriodNo of the table
TblPeriod that match
Something like =Dlookup("PeriodNo","TblPeriods", "ItemDate >=
PeriodSart and <= PeriodEnd)
I have try many different style (with " and [ ],without them) but no
success
Thanks for helping