|
-
September 30th, 2001, 03:06 AM
#1
null date when entering into database through ado
I have a samall problem .When i enter a date value through a recordset object the sql statement does not execute.
i am getting this value from a textfield which is blank.
the idea is to enter date of birth which the user of the form may not know.so to allow null entries.
please help.
thanx
-
October 1st, 2001, 02:31 AM
#2
Re: null date when entering into database through ado
Make sure that DateField allows Null value. Then,
If (IsDate(MyForm.txtDate) = true) then
m_rs("DateField") = CDate(MyForm.txtDate)
else
m_rs("DateField") = null
End If
m_rs.Update
--Take the life as it comes--
-
October 5th, 2001, 08:50 AM
#3
Re: null date when entering into database through ado
Hi. Try the Nz function. It handles zero values.
-
October 5th, 2001, 09:35 AM
#4
Re: null date when entering into database through ado
Note about that, Nz is only available in VBA, not in real VB.
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|