Data access and dates (simple question?!)
I'm tearing my hair out over what I thought was such an easy thing to do!
I'm using VB6 and the Data control. I have a number of text boxes linked
to Data/Time fields. I would like to be able to delete dates and leave these
text boxes empty but I either get 'Data Conversion error' type messages or
no message and no changes are saved. The problem is that Date/Time fields
cannot be zero length strings but should be either dates or NULL. I can't
set the text boxes to NULL and if I use Edit/Update it retriggers the Validate
function (which I don't want). If I set the text box CauseValidation event
to False it doesn't make any difference (a MS bug methinks). How can I delete
text boxes containing dates (linked to Date/Time data type) to leave them
Thanks in anticipation.
ps Am I being stupid by missing the obvious here?
Re: Data access and dates (simple question?!)
I have the same exact problem. I tried making my own method where on textbox_change,
it checks if the textbox.text="". If it is, i did textbox.text = null, but
sadly, that didnt do it. It wont except null.
Also, did you run into this problem... in access, you set the format to currency,
and thru vb, the textbox doesnt display the format, but just as a regular
number. anyways, if i get a solution to the above problem, ill be sure to
let you know.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center