Hi, I have the following sub:
Code:
Private Sub Form_Load()
Dim Days As Integer
For Days = 0 To 40
Me.DaysLoanedCmb.AddItem Format(DateAdd("d", Days, Now), "dd/mm/yyyy")
Next Days
Me.DaysLoanedCmb.DefaultValue = Format(DateAdd("d", 14, Now), "dd/mm/yyyy")
End Sub
My combo box gets populated ok with dates from Now to Now + 40 days.
I'd like to add a DefaultValue so that form opens with date Now + 14 days appears in the combo box, but the above code produces a blank combo box!
What am I doing wrong?
Thanks
David