Select Dates

  • Thread starter Thread starter dmeiser
  • Start date Start date
D

dmeiser

Hi,

I'm trying to fill a combo box with all dates from a specified date
until now.

Basically, what I want is something like "Select Date Where Date >=
#8/1/2005#" but I don't want to use a table of dates as that would get
ludicrously large and, I'm sure, wholly unnecessary. I'm just not sure
how to do this.

I would do it by just selecting the specific Date column from the
tables, but that would require building very complex set of UNION
queries and then adding a new month at the beginning of every month.
Plus, not every day of the month appears in these columns.

I tried a calendar, but there were just some nasty issues surrounding
the calendar control.

Thanks in advance.
 
dmeiser said:
I'm trying to fill a combo box with all dates from a specified date
until now.

Basically, what I want is something like "Select Date Where Date >=
#8/1/2005#" but I don't want to use a table of dates as that would get
ludicrously large and, I'm sure, wholly unnecessary. I'm just not sure
how to do this.

I would do it by just selecting the specific Date column from the
tables, but that would require building very complex set of UNION
queries and then adding a new month at the beginning of every month.
Plus, not every day of the month appears in these columns.


There are three relevant ways to provide a set of data to a
combo box. One is the ValueList, which would be ludicrous
in this case. You've already said that you don't want to
use a table, so that's out. The third way is to use a call
back function as the RowSourceType.
See Help - RowSourceType - specific function code arguments
for all the details and an extensive example.

In AXP, you could also use a disconnected ADO recordset.
This would be sort of like using the call back function, but
probably easier to undestand I don't use ADO so I don't
any more about this approach.
 
I decided not to do this at all. Instead, I'm just going to use a
Short Date formatted TextBox and use a Between statement in the query.


I figure, let them decide if what they're looking for is in the
database or if they've hit a bug.
 
dmeiser said:
I decided not to do this at all. Instead, I'm just going to use a
Short Date formatted TextBox and use a Between statement in the query.

I figure, let them decide if what they're looking for is in the
database or if they've hit a bug.


Sounds like a good plan to me ;-)
 
Back
Top