MarkItZero
Active member
Hello again,
In my app, I have a form which contains a listbox with all of the SalesNames from my Access table Salesman. When you click on one of the names in the listbox, the textboxes on the form are populated with the details of the record from the Salesman table.
Salesman
SalesID: AutoNumber
SalesName: Text
Password: Text
SecurityLevel: Number
The user is able to update the values in the SalesName, Password and SecurityLevel fields through Textboxes on the form.
When the User clicks Save, the values from the textbox are inserted into the database.
What I need to do, is set up a function that checks to make sure that the value in the Salesname text box is unique. I will then call the funtion everytime the user clicks the save button
Any suggestions?
Thanks!
In my app, I have a form which contains a listbox with all of the SalesNames from my Access table Salesman. When you click on one of the names in the listbox, the textboxes on the form are populated with the details of the record from the Salesman table.
Salesman
SalesID: AutoNumber
SalesName: Text
Password: Text
SecurityLevel: Number
The user is able to update the values in the SalesName, Password and SecurityLevel fields through Textboxes on the form.
When the User clicks Save, the values from the textbox are inserted into the database.
What I need to do, is set up a function that checks to make sure that the value in the Salesname text box is unique. I will then call the funtion everytime the user clicks the save button
Code:
If NameIsUnique () = True Then
UpdateRecordSet()
MsgBox("Progress Saved")
Else
MsgBox("SalesName must be Unique")
End If
Any suggestions?
Thanks!