Find Next Available Date

  • Follow


I have a query that filters out weekends and holiday dates. This query drives 
a combo box on my form. I would like the default value in this combo box to 
be the next available maturity date from the filtered query. The next 
available date will be driven off of a text box "trade_date" that defaults to 
date(). I have been struggling with this one. Any ideas?
0
Reply Utf 11/11/2007 11:50:00 PM

Nate,

There might be a simpler way suggested by one of our
experts, but I like to deal with dates using values based
on the current default epoch in Access. That said, it's
fairly straight forward in code to find the current day's
date in a bracketed query where weekends and holiday
entries carry with them a flag hidden in an un-displayed
column in your combo. Once found, it then becomes
easy to advance to the next non-weekend, non-holiday
entry in the query.

If this idea doesn't lend itself to your current database
structure, let us know a little bit more about what you
have in your database to work with. If your application
isn't driven by your database, it will usually give difficulty
trying to solve these types of issues.

Bill


"Nate" <Nate@discussions.microsoft.com> wrote in message 
news:6F456010-ACF1-42B5-BF05-5237C0BA6035@microsoft.com...
>I have a query that filters out weekends and holiday dates. This query 
>drives
> a combo box on my form. I would like the default value in this combo box 
> to
> be the next available maturity date from the filtered query. The next
> available date will be driven off of a text box "trade_date" that defaults 
> to
> date(). I have been struggling with this one. Any ideas? 


0
Reply Bill 11/12/2007 1:21:48 AM


1 Replies
310 Views

(page loaded in 0.044 seconds)

Similiar Articles:
















7/24/2012 11:07:50 AM


Reply: