Re: Date range question
From: Gerald Stanley (gcstanley_at_dsl.pipex.com)
Date: 03/29/04
- Next message: Van T. Dinh: "Re: New line in field"
- Previous message: Mo: "New line in field"
- In reply to: Istari: "Date range question"
- Next in thread: Istari: "Re: Date range question"
- Reply: Istari: "Re: Date range question"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Mar 2004 04:02:18 -0800
If you have multiple seasons on one row of your price
table, I would recommend that you normalise the table to
have one season per row. If you do, then the DLookUp
statement is along the following lines
=DLookUp("seasonPrice","Season","seasonStartDate <= #" &
[saleDate] & "# And seasonEndDate>= #" & [saleDate] & "#")
where
Season is the name of the table holding the prices
seasonPrice, seasonStartDate and seasonEndDate are the
names of the columns on the Season table
[saleDate] is the name of the control on the form
Hope This Helps
Gerald Stanley MCSD
>-----Original Message-----
>I have a table which contains prices which are valid
between a set of dates.
>
>I have
>Season1 Start (date)
>Season 1 End (date)
>Season 1 Price (number)
>
>Season 2 Start (date)
>Season 2 End (date)
>Season 2 Price (number)
>
>etc...
>
>Now, I need to check whether a date value given in a form
based on another
>table falls within which season, and then use dlookup to
insert the
>corresponding price value into a field on the form.
>
>Any help would be much appreciated.
>
>Istari
>
>
>.
>
- Next message: Van T. Dinh: "Re: New line in field"
- Previous message: Mo: "New line in field"
- In reply to: Istari: "Date range question"
- Next in thread: Istari: "Re: Date range question"
- Reply: Istari: "Re: Date range question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|