Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null Recordset Date Value

Status
Not open for further replies.

thefox149

Technical User
Nov 22, 2004
158
AU
I have a recordset that I am trying to edit all the fields except the date get updated

The Date/ Time fields in set to not required, with no default value


When saving I get a data type conversion error

I have tried using nz on the recordset value but it still throws the same error. It does successfully update the other rs!Fields

eg
rs!Date = Forms_formname.txtbox
it stops at date. the debug states Date as null and the txtbox = ""

I load the txtbox in the reverse fashion

On click

load rs!fields into txtbox'es

txtbox = rs!Date

This has worked for me a million times however the I have always insisted that the date is compulisory however in this circumstance it is not compulisory

My cat's name is sprinkles
-Ralph Wigam
 
Your textbox holds a ZeroLength value, not a Null.
You may try this:
If IsDate(Forms_formname.txtbox) Then rs!Date = Forms_formname.txtbox

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV where would this site be without you!!!

My cat's name is sprinkles
-Ralph Wigam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top