I am getting an error: you must save the record before going to a SetFocus or GoToForm action.
The cause is I have a form and a subform, one is addPatient and the other is addIncident.
I'd like to trigger an action when a user attempts to add a duplicate patient: no duplicate patient IDs are allowed, of course, but multiple Incident IDs for a single patient are allowed.
I have currently an event on txtPatientID on the frmPatientAdd form such that the user is informed that the PatientID already exists, and then the focus is redirected to the sfrmAddIncident subform, ideally with the proposed PatientID carried over into the subform, i.e. to [sfrmIncidentAdd]![cboPatientID].value.
But I'm getting an error! What I am doing on duplicates is to "undo" or cancel the PatientID add action before it results in an error, but then I'd like to carry that PatientID choice to the subform. It must be possible, no?
T.Y.
The cause is I have a form and a subform, one is addPatient and the other is addIncident.
I'd like to trigger an action when a user attempts to add a duplicate patient: no duplicate patient IDs are allowed, of course, but multiple Incident IDs for a single patient are allowed.
I have currently an event on txtPatientID on the frmPatientAdd form such that the user is informed that the PatientID already exists, and then the focus is redirected to the sfrmAddIncident subform, ideally with the proposed PatientID carried over into the subform, i.e. to [sfrmIncidentAdd]![cboPatientID].value.
But I'm getting an error! What I am doing on duplicates is to "undo" or cancel the PatientID add action before it results in an error, but then I'd like to carry that PatientID choice to the subform. It must be possible, no?
T.Y.