delete a date in a bounded date field

delete a date in a bounded date field

Post by Stéphane Gourdang » Sat, 31 Jan 1998 04:00:00



Using VB5 SP3 with Jet, I cannot delete a date in a textbox (or a maskedbox)
bounded with  date/time field of an access DB.
The field is set in MS Access as "Not required", so I can leave the field
empty when I create the record, but if I set a value, I am not able to
delete it. When I edit records in Access directly, I can delete it.
I think it is because Jet is considering it as a zero length string, wich of
course cannot be converted to a date type.
Is there a workaround for this?
Thank you,
Stephane

 
 
 

delete a date in a bounded date field

Post by Andre' Somer » Sat, 31 Jan 1998 04:00:00


Try setting the field to NULL.

Andre'


>Using VB5 SP3 with Jet, I cannot delete a date in a textbox (or a
maskedbox)
>bounded with  date/time field of an access DB.
>The field is set in MS Access as "Not required", so I can leave the field
>empty when I create the record, but if I set a value, I am not able to
>delete it. When I edit records in Access directly, I can delete it.
>I think it is because Jet is considering it as a zero length string, wich
of
>course cannot be converted to a date type.
>Is there a workaround for this?
>Thank you,
>Stephane


 
 
 

delete a date in a bounded date field

Post by David L. Beckwit » Sat, 31 Jan 1998 04:00:00


Bummer, isn't it? Seems to defeat the purpose of a bound control.

In the validate routine or before you do your update, check the datachanged
flag, if true then set the field in the data control to NULL and set
datachanged flag to false.

David L. Beckwith
--
*** Please remove nospam for a reply ***



Quote:> Using VB5 SP3 with Jet, I cannot delete a date in a textbox (or a
maskedbox)
> bounded with  date/time field of an access DB.

 
 
 

delete a date in a bounded date field

Post by Cal Stov » Sun, 01 Feb 1998 04:00:00


Can you set it to Null (using a variant)?

On Fri, 30 Jan 1998 09:16:32 +0100, "Stphane Gourdange"


>Using VB5 SP3 with Jet, I cannot delete a date in a textbox (or a maskedbox)
>bounded with  date/time field of an access DB.
>The field is set in MS Access as "Not required", so I can leave the field
>empty when I create the record, but if I set a value, I am not able to
>delete it. When I edit records in Access directly, I can delete it.
>I think it is because Jet is considering it as a zero length string, wich of
>course cannot be converted to a date type.
>Is there a workaround for this?
>Thank you,
>Stephane

---

Cal Stover
Remove the x to reply

 
 
 

delete a date in a bounded date field

Post by Kiem Tji » Tue, 03 Feb 1998 04:00:00


Shame on me for asking questions which others have already put to this
newsgroup and others have already answered.
My apologies to all.

I've tried it and it worked.


Quote:

> Can you set it to Null (using a variant)?

> Cal Stover
> Remove the x to reply

 
 
 

delete a date in a bounded date field

Post by Stéphane Gourdang » Tue, 03 Feb 1998 04:00:00


Testing the field value and then setting it to NULL works, but it is not the
conveniant solution I hoped to find.
Thank you to all of you for your help.
Stephane


>Try setting the field to NULL.

>Andre'


>>Using VB5 SP3 with Jet, I cannot delete a date in a textbox (or a
>maskedbox)
>>bounded with  date/time field of an access DB.
>>The field is set in MS Access as "Not required", so I can leave the field
>>empty when I create the record, but if I set a value, I am not able to
>>delete it. When I edit records in Access directly, I can delete it.
>>I think it is because Jet is considering it as a zero length string, wich
>of
>>course cannot be converted to a date type.
>>Is there a workaround for this?
>>Thank you,
>>Stephane

 
 
 

1. delete a date in a bounded date field

Using VB5 SP3 with Jet, I cannot delete a date in a textbox (or a maskedbox)
bounded with  date/time field of an access DB.
The field is set in MS Access as "Not required", so I can leave the field
empty when I create the record, but if I set a value, I am not able to
delete it. When I edit records in Access directly, I can delete it.
I think it is because Jet is considering it as a zero length string, wich of
course cannot be converted to a date type.
Is there a workaround for this?
Thank you,
Stephane

2. Ping from VB Appl.

3. SQL: Select some data with date criteria, but only by Date part of date field

4. calculated member question...

5. HELP: Can't delete Date Data from Bound Textbox

6. problem in converting sql date to string format

7. Replace part of Date field by another Date Field

8. Do I need to create a DSN (ODBC) on a local computer

9. Query datetime-field by date when field contains date + time

10. ((Current Date - Start Date)/(End Date - Start Date))*Contract Amt

11. Mask Date Bound Field

12. Errors with Text Box bound to Date Field

13. Masked date fields bound to a table