I have a problem with my database and ComboBox. On my database I put Indexed: No Duplicate in one of my fields and on my comboboxlist I put numbers from 1 to 15 so it will error when i duplicate a data. And this is my code:
I dont know if this is right but, what I want to happen is when i saved a new entry it will save and when I enter a duplicate data, there will be a pop up msg that saying "the room is already occupied". please help.
Ill show an image

- If Combo1.CausesValidation = false Then
- MsgBox "The Room is already Occupied. Please find another room.", vbInformation
- Else
- Adodc1.Recordset.Update
- MsgBox "Record Saved.", vbInformation
- frmMain.Show
- End If

- 49 views