PDA

Click to See Complete Forum and Search --> : This action was cancelled by an associated object


JHausmann
Feb 9th, 2000, 12:57 AM
How about checking the length of the field and setting it to vbnull if it's zero:

if len(form.text) < 1 then form.text=vbnull

islandlarry
Feb 9th, 2000, 04:14 AM
Same error occurs. It's actually returning the value of vbNull (1) in the text box. I also tried vbEmpty and that doesn't work.

pardede
Feb 9th, 2000, 04:51 AM
I am thinking in a different direction, try to examine your record updating scheme, remember that in the validate event (if you code it) cancellation could happen, and that record moves also implies update actions, see if your date-textbox has any connection to any impicite updating actions...

JHausmann
Feb 9th, 2000, 05:03 AM
Well, this will work but you'll have a date in the field where you wanted a null

if len(form.text) < 1 then form.text=cdate(1)

It will set the date to 12/31/1899.

islandlarry
Feb 9th, 2000, 11:10 AM
I'm getting this error when update an array of text boxes on a form using the recordset.update method. The error is only occuring when I try to delete a date value. The text box allownull value is set to true. Text fields in Access are set to allow zero length strings, but there is no such option for the date/time fields. Any suggestions?

JHausmann
Feb 9th, 2000, 11:22 AM
Have you tried setting the "required" attribute of the date field to "N" ?

islandlarry
Feb 9th, 2000, 11:29 AM
The required option is set to "No".