The Add Form is working fine.
Add Form Code:
Option Explicit ___________________________________ Private Sub Form_Load() Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 cboDepartment.Clear cboDepartment.AddItem "Department 1" cboDepartment.AddItem "Sample 2" cboDepartment.AddItem "Sample 3" cboDepartment.AddItem "Sample 4" cboDepartment.AddItem "Sample 5" cboSchool.Clear cboSchool.AddItem "School 1" cboSchool.AddItem "School 2" cboSchool.AddItem "School 3" cboSchool.AddItem "School 4" cboSchool.AddItem "School 5" cboStatus.Clear cboStatus.AddItem "RECEIVED" cboStatus.AddItem "PRINTED" End Sub ___________________________________ Private Sub txtOwner_LostFocus() On Error GoTo errorowner FindRecordset "Select Owner From Finder Where Owner = '" & txtOwner & "';" If Not FindRs.EOF = True Then If FindRs.Fields("Owner").Value = txtOwner Then MsgBox "I.D. Owner already exist. Please specify another one.", vbExclamation, "I.D. Owner" txtOwner.SetFocus txtOwner.BackColor = vbYellow txtOwner.Text = vbNullString Else txtOwner.BackColor = vbWhite End If Else txtOwner.BackColor = vbWhite End If Exit Sub: errorowner: MsgBox Error.Description, vbCritical, "Error" Set FindCon = Nothing Set FindRs = Nothing End End Sub ___________________________________ Private Sub cmdSave_Click() On Error GoTo errorsave If txtOwner.Text = vbNullString Or cboDepartment.ListIndex = -1 Or cboSchool.ListIndex = -1 Then MsgBox "Please fill the required fields in order to proceed.", vbExclamation, "Saving Status" Exit Sub: End If executeQuery "INSERT INTO Finder(Owner, Acquired, Released, Department, School, Status)" _ & " VALUES ('" & txtOwner & "', '" & txtAcquired & "', '" & txtReleased & "', '" & cboDepartment & "', '" & cboSchool & "', '" & cboStatus & "');" Call RefreshListview If MsgBox("New I.D. has been added now , Do you want to enter another I.D.?", vbYesNo + vbQuestion, "Confirmation") = vbYes Then Call ClearAll Else Unload Me Call RefreshListview End If Exit Sub: errorsave: MsgBox Err.Description, vbCritical, "Error" Set FindCon = Nothing Set FindRs = Nothing End End Sub ___________________________________ Private Sub ClearAll() Dim txt, cbo As Control For Each txt In Me If TypeOf txt Is TextBox Then txt.Text = vbNullString End If Next txt For Each cbo In Me If TypeOf cbo Is ComboBox Then cbo.ListIndex = -1 End If Next cbo End Sub ___________________________________ Private Sub cboDepartment_Click() cboDepartment.Enabled = True End Sub ___________________________________ Private Sub txtReleased_change() txtReleased.Enabled = False End Sub ___________________________________ Private Sub txtOwner_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) End Sub