PDA

View Full Version : Urgent: Need help regarding Subform



pdesh3
05-23-2007, 06:59 AM
Hi,

I have a form which is used to search the patient details.
When I search for a patient it displays a list of patients' details in the subform. I want to implement the functionality where, when I click on any of the patient name in the subform a new form diaplying all the details of the patients should be displayed. I know there is a event called Dblclick to do this, but I donno how to use it.

I did not find any grids like datagrid and flexi grid in Access 2003 to implement this.
Can anyone please help me regarding this...

Thanks ,
Prathima.

OBP
05-28-2007, 06:56 AM
Is the Sub Form in "Single" or "Continuous" Form mode?

mattj
05-31-2007, 11:46 AM
If you open the properties of the control in your subform that displays the patient name and go to the events tab you will find the DoubleClick event.
Using this event, you can use the OpenForm command to open the new form.. Use the OpenArgs section of the openform command to specify the criteria

Something like
docmd.OpenForm "frmPatientForm",,,"PatientName = '" & Me.PatientName & "'"

(Aircode - prob needs tweaked)

HTH
Matt