Any idea? I really appreciate everyone's help. Thanks!
Here is my code under the Save Button on the Pop Up form "Add a new patient":
Expand|Select|Wrap|Line Numbers
- Private Sub cmdSave_Click()
- If IsNull(txtPT_MRN) Then
- MsgBox "Patient MRN is required!", vbInformation, "REQUIRED FIELD!"
- [txtPT_MRN].SetFocus
- ElseIf IsNull(txtPT_Name) Then
- MsgBox "Patient Name required!", vbInformation, "REQUIRED FIELD!"
- [txtPT_Name].SetFocus
- Else
- MsgBox "Patient: " & [txtPT_MRN] & " " & [txtPT_Name] & " has been added successfully!", vbInformation, "Patient has been added!"
- DoCmd.Close acForm, "fdlgAddPatient", acSaveYes
- [Forms]![frmMedRec]![cboMRN].SetFocus
- [Forms]![frmMedRec]![cboMRN].Requery
- End If
- Exit Sub
- End Sub