I solved that problem by using isnull(raval) then
rval = ""
I still have a problem with dates though, but I'm not sure anyone knows.
Sending to SQL server you don't surround the dates with # symbols.
Unfortunately when I remove them I get something like 01/01/1900 on all date
fields on export to SQL. I wonder If I have to use a date function or convert
to text with ' ' in SQL.
Subject: Re: DAO error getting recordset
From: "Michel Walsh" vanderghast@VirusAreFunnierThanSpam
Date: 12/18/2003 7:11 AM Eastern Standard Time
Message-id: <u4BQE$(E-Mail Removed)>
Hi,
Since RVal is a scalar, it can only hold one single value. You would get the
same result if, instead of
Dim Rval
dim i as integer
for i = 0 to 10
Rval = rs.Fields(i).Value
msgbox Rval
next i
you would say:
Dim Rval
Rval=rs.Fields(10).Value
In that case, Rval would get the value in the 11 th field, first record.
That's all. Where do you want the other fields? the other records?
DIm i As long
Do Until rs.EOF
For i = 0 to 10
Debug.Print rs.Fields(i);
Next i
Debug.Print vbNullString
rs.MoveNext ' change record
Loop
would print, in the immediate debug window, the first 11 fields, all
records.
Hoping it may help,
Vanderghast, Access MVP
(E-Mail Removed)