OLE Error?

data_analyst
10-23-2000, 03:57 PM
OK, i'm getting this run-time error '-2147217887(80040e21)' and it's about to drive me CRAZY! Any help would be greatly appricated.
I am trying to update a access 97 database with input from a group of comboboxes. Here is some of my code. Again Thank you in advance!

rs.Open "Table", ConString, adOpenKeyset, adLockOptimistic, adCmdTableDirect
rs.Find "CustomerNumber =" & txtcustn.Text, , adSearchForward
If rs.EOF Then
rs.AddNew
End If
rs.Fields("customerNumber") = txtcustn.Text
rs.Fields("Authorized") = CboxAuthorized.Text
rs.Fields("COem") = CboxCOEM.Text
this is where the error is occuring.
rs.Fields.......
rs.fileds.....
rs.fileds....
rs.update
rs.close

BillSoo
10-23-2000, 05:08 PM
According to MSDN, that error code has a number of possible meanings. Most of them have to do with problems with date types. Is rs.Fields("COem") defined as type date?

"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder

data_analyst
10-24-2000, 02:28 PM
No that is a text field....
and Come to think of it I only have one Date field.(Now())

BillSoo
10-24-2000, 05:53 PM
Well, is it possible you are setting it to a NULL string then? What is being set on the next line? How about just posting your structure and code.


"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum