Masked Edit Control Problem

Masked Edit Control Problem

Post by Anthony Brow » Mon, 27 May 2002 04:03:24



Im currently using the masked edit control to input date information into a
database using the following mask ##/##/## with a format of DD/MM/YY

Ive been able to get the masked edit to save input into an access  database
but only if I change the database field from a "Date" field to a "text"
field as the date is being saved without the "/" character (i.e. 250502 for
25/05/02) so if I leave the field as a date field the program bombs.

So how do I get my "/" character back ? Is there a property of the masked
edit control that can do this for me ?. Is it done in code ?
Or is it done some other way I dont know about ??????

Any help is greatly appreciated

Regards

T on Y

 
 
 

1. masked Edit Control Problem

Greetings,

I am quite new to Visual Basic 5.0(And programmng in general) and am
having the following problem.

I have a masked edit box control on my form.  The masked control is
bound to a data control and the data control is bound to an MS Access 97
table.  The masked control is looking at a date field in the Access
table.

I set up the input mask as ##/##/#### to only accept numbers.  After the
focus is lost, I use IsDate on the entered text to ensure that a valid
dat is entered.  Now, in order for IsDate to work correctly, I must set
the PromptInclude value to True in order for the text value to retain
the literals(ie - 10/20/1998 as opposed to 10201998).

So, everything seems to work fine, however, when I use the Date Control
to move to the next record and that next record is null, the date
entered on the previous record is "carried over" on the masked edit
control.

This is really strange, and I can't seem to find the problem.  It all
seems linked to the PromptInclude property of the masked edit control.

If anyone is willing to help me on this, it would be greatly
appreciated.  If necessary, I could e-mail the database and the vb
project if that would make troubleshooting this easier.

Thanks in advance.

2. US-CO-CONSULTANTS

3. problems with Mask edit controls bound to data controls

4. How do I find out what archived logfiles are needed for RECOVER STANDBY DATABASE?

5. Masked Edit Control and Remote data control problem

6. A few questions on statistics

7. Problems with the Masked Edit control in VB4.0

8. Building DatawareHouse from OLTP database

9. Problem with Masked Edit Control

10. Masked Edit Control /AddNew Problem

11. Masked Edit Control date type problem

12. Problem with Masked Edit control...

13. Problem with Masked Edit Control 6.0