trying to update maskedEdit control with vb6 and data control 
Author Message
 trying to update maskedEdit control with vb6 and data control

Every time I want to update a maskededit control,  which i use to force ppl
to enter a date, if there was no record for that field, it won't show an
empty date field, but instead it will show the date from the former record.
what to do?
thanks
alain


Sat, 15 Feb 2003 03:00:00 GMT  
 trying to update maskedEdit control with vb6 and data control
On Tue, 29 Aug 2000 14:01:59 +0200, "Alain Bobbe"

I have never worked with a masked edit control, but ......

How about setting the date to Today() if the value of the field is
Null?  I'd do it during a "repopulate" method with the next record
something like

mskTextBox.text = Iif(Isnull(rs.field(iNum), Date(), rs.field(iNum)

You might need to add formatting to the date function, though I think
that the formatting is done by the Masked edit control as you insert
the data, I believe.

Sol.

Quote:
>Every time I want to update a maskededit control,  which i use to force ppl
>to enter a date, if there was no record for that field, it won't show an
>empty date field, but instead it will show the date from the former record.
>what to do?
>thanks
>alain



Sun, 16 Feb 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. I am trying to update a record, i am not using data control

2. Data Control Problem while trying to Update empty fields

3. I am trying to update a record, i am not using data control

4. Trying to update RDS data control: field is read-only

5. Update Oracle data using Data control and SQL?

6. Update data by remote data control

7. Problem on Update ODBC-Data thru a Data-Control in VB 5

8. VB6 crashes when trying to add controls in Windows XP

9. VB6 crashes when trying to add Common Dialog Control to a project

10. Trying to get a preview using the MS CommonDialog control in VB6

11. VB6-Data Control-Can't find data access library

12. error trying to link DBGrid and data control

 

 
Powered by phpBB® Forum Software