Future dates in a Combo Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a Form (dialogue box) with a combo box. I wish to use the list
in Column1 to select the dates in Column2.

Column1 (text) Column2 (date)
In 1 week Today's date plus 1 week
In 2 weeks Today's date plus 2 weeks
In 1 month Today's date plus 1 month
etc. etc

How do I express the dates in Column2? The date isn't to change once it's
selected.

Thank you

Peter
 
You could either use code to add values to a Value List combo box or create
a table like:
tblDateIntervals
IntervalTitle Interval IntervalIncrement
======== ===== =============
In 1 Week d 7
In 2 Weeks d 14
In 1 Month m 1

Then create a query with this SQL view:
SELECT IntervalTitle, DateAdd([Interval],[IntervalIncrement],Date()) AS
CalcDate
FROM tblDateIntervals
ORDER BY DateAdd([Interval],[IntervalIncrement],Date());
 
Dear Duane
Thanks for your kind help. It works great except for one thing.

My dropdown list looks like this:

IntervalTitle CalcDate
In 1 week 27-Jan-06
In 2 weeks 03-Feb-06
etc.

But when make a selection, the IntervalTitle appears in the combo box rather
than the date. The properties are set to:
Columns: 2
Bound column: 2

But they don't have much effect whatever I set them to.

Thanks

Peter
 
Try changing the order of the fields in the RowSource. The Combo Box is
always going to show the first field with a non-zero width, regardless of
whether it's the bound field.
 
Back
Top