Private Sub txtProvince_Change()
If txtProvince.Text = "" Then
txtProvince.SetFocus
MsgBox "Specify first the field"
End If
End Sub

Private Sub txtRegNo_Click()
If txtRegNo.Text = "" Then
txtRegNo.SetFocus
MsgBox "Entry must have value", vbInformation, ""
Else
txtRegNo.Locked = True
End If
rs.AddNew
End Sub

What the problem here?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.