Run-time error 2113
The value you entered isn’t valid for this field.
The txtbox is unbound so I don’t think that’s the problem. The field value CFS in the table is a date and I’m setting CFS as an object so this is where I’m guessing things are going wrong. I can't set CFS as a date the way I have it set up. Can anyone help me get this either formatted correctly or figured out?
Sub addCFSDate()
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT CFS FROM LoadDateCFS", dbOpenDynaset)
Dim CFS As Object
Set CFS = rs("CFS")
Do While Not rs.EOF
'rs.MoveFirst
Debug.Print rs![CFS] ' compare this syntax to the usual syntax in the example below
rs.MoveNext
Loop
Me.txtCFS = rs!CFS
rs.Close
Set rs = Nothing
End Sub
Thanks!!
The value you entered isn’t valid for this field.
The txtbox is unbound so I don’t think that’s the problem. The field value CFS in the table is a date and I’m setting CFS as an object so this is where I’m guessing things are going wrong. I can't set CFS as a date the way I have it set up. Can anyone help me get this either formatted correctly or figured out?
Sub addCFSDate()
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT CFS FROM LoadDateCFS", dbOpenDynaset)
Dim CFS As Object
Set CFS = rs("CFS")
Do While Not rs.EOF
'rs.MoveFirst
Debug.Print rs![CFS] ' compare this syntax to the usual syntax in the example below
rs.MoveNext
Loop
Me.txtCFS = rs!CFS
rs.Close
Set rs = Nothing
End Sub
Thanks!!