How to save MaskEdBox Blank Date Value having Mask ##/##/#### 
Author Message
 How to save MaskEdBox Blank Date Value having Mask ##/##/####

I have created a Mask Edit Box and set its Mask property to ##/##/#### for
date purpose.
This control is unbound and when I fill it with date and update my
recordset, the date is saved fine in Database however if I leave it blank,
Type Mismatch error occurs.

How can I check if this control is blank or any other way to convert blanks
to blank date.

my code is as under:-

rs.addnew
!date=maskedbox1.text
rs.update

Best Regards,

Luqman



Mon, 20 Jan 2003 03:00:00 GMT  
 How to save MaskEdBox Blank Date Value having Mask ##/##/####

Did you try this

if maskedbox1 > "" then
   rs.addnew
   !date=maskedbox1.text
   rs.update
end if

Andy


Quote:
> I have created a Mask Edit Box and set its Mask property to ##/##/#### for
> date purpose.
> This control is unbound and when I fill it with date and update my
> recordset, the date is saved fine in Database however if I leave it blank,
> Type Mismatch error occurs.

> How can I check if this control is blank or any other way to convert
blanks
> to blank date.

> my code is as under:-

> rs.addnew
> !date=maskedbox1.text
> rs.update

> Best Regards,

> Luqman



Mon, 20 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Having problems binding a mask control to a date field

2. saving MaskEdBox values to a recordset.

3. Having problems with locating date values

4. saving blank date field

5. Mask for dates problem; Save failed problem

6. Dates, MaskedBox, Regional settings and short date

7. Dates, MaskedBox, Regional settings and short date

8. How to put edit mask in MaskEdBox?

9. REPOST: Want mask chars but not prompt chars in MaskEdBox (from Aug 22)

10. Want mask chars but not prompt chars in MaskEdBox

11. maskedbox.mask

12. Mask of MaskEdBox

 

 
Powered by phpBB® Forum Software