Connecting Tech Pros Worldwide Forums | Help | Site Map

Losing subform current record after delete

impecunious@hotmail.com
Guest
 
Posts: n/a
#1: Aug 10 '06
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!


Impecunious
Guest
 
Posts: n/a
#2: Aug 10 '06

re: Losing subform current record after delete


Any thoughts, folks?

Closed Thread