I've got a tab control that drives several things, and I'm running into a problem.
The user searches for a particular patient using unbound controls, and a patient subform displays the associated results. When the user selects the patient they want in the sub form datasheet, this selection drives the results shown in the other two main tabs of the form, like patient details and transactions. The problem is, whenever the user deletes a particular transaction in another tab, I lose the primary key of the patient they previously selected at startup. Instead, the user sees the transactions of the first patient in the underlying table.
For my transactions sub form, for example, I make this association as such:
Me.subfrm_transaction_transactions.Form.Filter = "PATIENT_ID = " & Me.FRM_SUB_PATIENT.Form!PATIENT_ID
I've created a variable to capture this patient ID, and this remedies part of the problem, but I'm really hoping there's a more elegant way to preserve the selected patient in the subform, regardless of any actions the user makes elsewhere in the main tabs.
Thanks!
The user searches for a particular patient using unbound controls, and a patient subform displays the associated results. When the user selects the patient they want in the sub form datasheet, this selection drives the results shown in the other two main tabs of the form, like patient details and transactions. The problem is, whenever the user deletes a particular transaction in another tab, I lose the primary key of the patient they previously selected at startup. Instead, the user sees the transactions of the first patient in the underlying table.
For my transactions sub form, for example, I make this association as such:
Me.subfrm_transaction_transactions.Form.Filter = "PATIENT_ID = " & Me.FRM_SUB_PATIENT.Form!PATIENT_ID
I've created a variable to capture this patient ID, and this remedies part of the problem, but I'm really hoping there's a more elegant way to preserve the selected patient in the subform, regardless of any actions the user makes elsewhere in the main tabs.
Thanks!