aussiecyclone
April 8th, 2001, 12:55 AM
Hi,
Q1 From what I have read my code for edit in Q1 below should work, I’m missing something, the data is not being update My DB has a key field called ID.
Q2. How do I validate a MaskEditBox My code is below in Q2.
Any help appreciated.
Regards,
Alan.
Q1
Private Sub cmdUpdate_Click()
'Edit and save customer details
With Customers
.Edit
'Trap for null text boxes
If MaskABN.Text = "" Then
Customers.Fields("ABN").Value = Null
Else
Customers.Fields("ABN").Value = MaskABN.Text
End If
Customers("ABN") = MaskABN.Text
Customers("Telephone") = MaskTelephone.Text
.Update
End With
End Sub
End of Code
Q2.
‘I have a masked edit box that needs validating if a number is missed out.
Private Sub MaskABN_GotFocus()
MaskABN.Mask = "## ### ### ###"
End Sub
Private Sub MaskABN_LostFocus()
If MaskABN.Mask <> THE FORMAT OF THE MASK AND COMPLETE then
Msg “Do Something”
End Sub
Q1 From what I have read my code for edit in Q1 below should work, I’m missing something, the data is not being update My DB has a key field called ID.
Q2. How do I validate a MaskEditBox My code is below in Q2.
Any help appreciated.
Regards,
Alan.
Q1
Private Sub cmdUpdate_Click()
'Edit and save customer details
With Customers
.Edit
'Trap for null text boxes
If MaskABN.Text = "" Then
Customers.Fields("ABN").Value = Null
Else
Customers.Fields("ABN").Value = MaskABN.Text
End If
Customers("ABN") = MaskABN.Text
Customers("Telephone") = MaskTelephone.Text
.Update
End With
End Sub
End of Code
Q2.
‘I have a masked edit box that needs validating if a number is missed out.
Private Sub MaskABN_GotFocus()
MaskABN.Mask = "## ### ### ###"
End Sub
Private Sub MaskABN_LostFocus()
If MaskABN.Mask <> THE FORMAT OF THE MASK AND COMPLETE then
Msg “Do Something”
End Sub