View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default populate Access numeric field with nothing


this works for me..

oCN.Execute "INSERT INTO tmp_test (id,rank) VALUES ('ABC',Null)"

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam

Dim wrote in message
om:

Hi everyone
i'm having an issue with pushing into Access DB numeric field empty
value from Excel cell using ADO
the following INSERT statement is built dymanicly picking values from
cells and is executed from Excel macro through ADO Execute command: if
a cell which related to field between #11/15/2004# and "blah" is empty
(excel format for that cell is general) the code throughs err message
that type mismatch..Access field set up:
DataType as number
Field size is Double
Required NO
NO Validation Rules , NO Validation Text

SQL statement gives err message:
INSERT INTO Tbl VALUES (99041838306,#11/15/2004#,,"blah")

this record will populate DB without problems:
INSERT INTO Tbl VALUES (99041838306,#11/15/2004#,0,"blah")
thank U in advance
Dim