Problem: Maskedbox input mask lost on clearing of fields
Hello, im trying to figure out how to maintain my input mask after i clear the masked box,
using this:
<code>
frmenterdata.MaskEdBox1.Mask = ""
frmenterdata.MaskEdBox1.Text = ""
frmenterdata.MaskEdBox2.Mask = ""
frmenterdata.MaskEdBox2.Text = ""
</code>
It loses its input mask once i press my data enter button which uses the following code:
<code>
Private Sub cmdenterdata_Click()
Dim dataenter As String
'Built-in method to add a new record
Adodc1.Recordset.AddNew
'clears all fields
clear
'clears fields that didnt clear the first time
chkditch = "0"
chkmv = "0"
chkrip = "0"
chkculverts = "0"
chkBridges = "0"
chkbufferzones = "0"
'disables enterdatabutton, the reason is: if this button is pressed twice
'an error will occur, so the error is caught before it occurs
cmdenterdata.Enabled = False
'Message Prompt
dataenter = MsgBox("Please enter the data in the blank fields provided, once finished use the navigation buttons to confirm the data has been entered", vbInformation + vbOKOnly, "Data Entry Instructions")
frmenterdata.MaskEdBox1.Mask = "##/##/##"
frmenterdata.MaskEdBox2.Mask = "####-##-###"
End Sub
</code>
Note: the 2 MaskedBox's are linked to my data control
Anyone have any solutions on how i can maintain my input masks while still clearing my fields??
Thanks in advance