Subforms

tanya74

Registered User.
Local time
Today, 22:27
Joined
Dec 16, 2010
Messages
14
Hi everyone,

I am having some difficulty and I'm sure if I am just way off track or not!!

I am trying to provide a form to allow the user to select two patients from the Patients Table. Each patient can have notes. I need to be able to move one patients notes to another patient.

At the moment I have a form (MergeForm) with two subform (sfOldPatient and sfNewPatient). The subform shows the list of patients with a filter text box to narrow down the patients. My problem is that I cant seem to access the filtered patient from the MergeForm.

I tried exposing the textbox displaying the ID of the patient by

Code:
Public Function SelectedPatient() As String
    'Returns the Id of the Selected Patient on the subform
    SelectedPatient = txtId.Value
End Function

But I couldnt seem to access it.

Am I completely off track? or just missing something?

Thanks in advance for your help.
 
Dear tanya
It will be much help if you can upload the form or at least snapshot.

My problem is that I cant seem to access the filtered patient from the MergeForm.>> what is the Merge form based on??
Aren't you using combo/dropdown for Patient selections?
 
Thanks ash1123 for your prompt reply... I didnt use a select list or combo box because the number of patients is very large... Is that the right thing to do? I am still pretty new to Access.

I did a bit more research and found I should be using
Code:
Forms!MergeForm!sfOldPatient.Form.SelectedPatient()
to access the exposed function.

It seems to be working at the moment.

Thanks again for your help.
 

Users who are viewing this thread

Back
Top Bottom