Adding date values at run-time into a Combo Box

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

Guest

Is there a Function that can list all the days of a month? For example, my
help provides me with a WeekDay (e.g.,
intOffset = Abs((9 - Weekday(Now))Mod 7)
ListMondays = Format(Now() + intOffset + 7 * row,"mmmm d")

What about for any given month listing each day of that month?
 
Hi Sleepless,

Make a table called Numbers

*Numbers*
Num, integer

make records 1-31 so you can use this table for days or for months (or
for number of labels to print, etc -- anything you need a counter for)

then, here can be the combobox rowsource to list all days in current
month (substitute fieldname if you want it for a particular month:

SELECT DateSerial( year(date()), month(date()), Num)
FROM Numbers
WHERE Num <= Day( DateSerial( year(date()), month(date())+1, 0) )


Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Back
Top