Hello there
I am just trying to learn during my free time and need help from Access Guru
I am trying to learn the controls therefore, my table consist of only 3 field
customer ID, Name, Relationship (all fields are text)
form is unbound
I put two checks at customer ID
1) duplicate id - working perfectly, with the help of forum thanks to JHB
2) customer id can't be nil - work perfectly with the help of forum
Here's my is problem, when I try to close the form using close button (both code given below) - i received the message Customer ID can't be NIL, therefore, every time i put any value in the field to close the form
here's the Customer ID Can't be NIL code
Private Sub Txtcid_Exit(Cancel As Integer)
On Error GoTo txtcid_exit_err
If Len(Me.Txtcid.Text) = 0 Then
MsgBox "Customer ID can't be NIL", , "Information"
Cancel = True
End If
txtcid_exit_exit:
Exit Sub
txtcid_exit_err:
Resume txtcid_exit_exit
End Sub
here's the closing form button code
Private Sub Butclose_Click()
DoCmd.Close
End Sub
I am just trying to learn during my free time and need help from Access Guru
I am trying to learn the controls therefore, my table consist of only 3 field
customer ID, Name, Relationship (all fields are text)
form is unbound
I put two checks at customer ID
1) duplicate id - working perfectly, with the help of forum thanks to JHB
2) customer id can't be nil - work perfectly with the help of forum
Here's my is problem, when I try to close the form using close button (both code given below) - i received the message Customer ID can't be NIL, therefore, every time i put any value in the field to close the form
here's the Customer ID Can't be NIL code
Private Sub Txtcid_Exit(Cancel As Integer)
On Error GoTo txtcid_exit_err
If Len(Me.Txtcid.Text) = 0 Then
MsgBox "Customer ID can't be NIL", , "Information"
Cancel = True
End If
txtcid_exit_exit:
Exit Sub
txtcid_exit_err:
Resume txtcid_exit_exit
End Sub
here's the closing form button code
Private Sub Butclose_Click()
DoCmd.Close
End Sub