ChrisLayfield
Registered User.
- Local time
- Today, 02:11
- Joined
- May 11, 2010
- Messages
- 55
I have the following code to retrieve a recordset, which works perfectly. The issue comes form trying to assign the DateofClear data. It is retrieved correctly with the stored Short Date format, but when I run this where I assign the data to the text box on the form I get an 'Update or CancelUpdate without AddNew or Edit." error.
Code:
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT EmployeeID, BckgrdClearLvl, DateofClear FROM jtbl_EmployeeBackground " & _
"WHERE jtbl_EmployeeBackground.EmployeeID = '" & Forms!frmBackgroundChecks.cbxSelectEmployee & "';")
Me.txtEmployeeName = rs(0)
Me.BckgrdClearLvl.RowSourceType = "Field List"
Me.BckgrdClearLvl.RowSource = rs(1)
Me.DateofClear = rs(2)