please help

  • Thread starter Thread starter SJJ via AccessMonster.com
  • Start date Start date
S

SJJ via AccessMonster.com

i wrote vba code to generate dates between given two start and end dates.

how can i put these dates into the rowsource of a combo box.

i tried it and no solution, any body please.

thanks in advance
 
SJJ via AccessMonster.com said:
i wrote vba code to generate dates between given two start and end
dates.

how can i put these dates into the rowsource of a combo box.

i tried it and no solution, any body please.

thanks in advance

You could create a user-defined RowSourceType function. Such a function
can be specified in a combo or list box's RowSourceType property. The
function must take specific arguments and return specific values
depending on which argument values are passed to it. For details, go
into the VB Editor and search the help for "rowsourcetype function".
 
i wrote vba code to generate dates between given two start and end
dates.

how can i put these dates into the rowsource of a combo box.

dim rowSourceString as string rowSourceString = ""

for tempDate = #2005-09-12# to #2006-02-21# step 7
' don't add a semicolon before the first item if
len(rowSourceString)>0 then
rowSourceString = rowSourceString & ";"
end if rowSourceString = rowSourceString & _
Format(tempDate, "dd/mm/yyyy")

next tempDate

myList.RowSourceType = "Value List" myList.RowSource = rowSourceString
myList.Requery


Hope that helps


Tim F
 
Back
Top