Hi,
I have a form & am using code to set a dropdown list:
Code:
Private Sub Form_Load()
Dim myYearArray(2) As String, myYearList As String, i As Integer
For i = 0 To 2
myYearArray(i) = CStr(Year(DateAdd("yyyy", i * 1, Date)))
Next i
myYearList = Join(myYearArray, ";")
Me!cmbYr.RowSource = myYearList
End Sub
If I have no record source for the form, this works fine, but if I set the record source, even if I leave cmbYr unbound, I get the above error.
I can't even use the excuse of being blonde this time I simply just have no idea why!
Can anyone help please?
Thanks
I have a form & am using code to set a dropdown list:
Code:
Private Sub Form_Load()
Dim myYearArray(2) As String, myYearList As String, i As Integer
For i = 0 To 2
myYearArray(i) = CStr(Year(DateAdd("yyyy", i * 1, Date)))
Next i
myYearList = Join(myYearArray, ";")
Me!cmbYr.RowSource = myYearList
End Sub
If I have no record source for the form, this works fine, but if I set the record source, even if I leave cmbYr unbound, I get the above error.
I can't even use the excuse of being blonde this time I simply just have no idea why!
Can anyone help please?
Thanks