Click to See Complete Forum and Search --> : MaskEdit Control deletes data


Vlad Chapranov
June 3rd, 1999, 03:16 PM
I have absolutely the same procedures in several forms to work with phone and fax numbers. They work on Data Control Reposition event:
MaskEdPhone.Refresh
If IsNull(datSupplier.Recordset.Fields("[Phone Number]")) = True Then
MaskEdPhone.Mask = "" 'delete mask, because text property will not be cleared without this
MaskEdPhone.Text = ""
MaskEdPhone.Mask = "(###) ###-####" 'restore mask
Else
MaskEdPhone.Mask = "(###) ###-####"
End If

'clear mask control for AccountFax
MaskEdFax.Refresh
If IsNull(datSupplier.Recordset.Fields("[Fax Number]")) = True Then
MaskEdFax.Mask = "" 'delete mask, because text property will not be cleared without this
MaskEdFax.Text = ""
MaskEdFax.Mask = "(###) ###-####" 'restore mask
Else
MaskEdFax.Mask = "(###) ###-####"
End If

Everything was fine for a long period of time. After a new version was installed MaskEdPhone only on one form started to work wrong. Before to run application I check in a database (Access) Phone Numbers. All of them are there. When Form has loaded only MaskEdPhone is empty (but Fax Number is good). Phone Number was deleted from database. If I go through recordset, all Phone numbers are cleared. It happens only on 3 machines (slowest) and never happend before and doesn't happen now on faster machines. I can't replicate this problem on developer machine.
Where do I need to look for a bug? Any ideas?
Thank you.
Vlad