By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,673 Members | 1,257 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,673 IT Pros & Developers. It's quick & easy.

Urgent: Need help regarding SubForm

P: 15
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.
May 23 '07 #1
Share this Question
Share on Google+
1 Reply

puppydogbuddy
Expert 100+
P: 1,923
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.
Try placing the following code behind your subform. In order to compile it, you will first have to replace the generic names I used for objects with the actual names of those objects in your application.

Expand|Select|Wrap|Line Numbers
  1. Private Sub PatientName_DblClick(Cancel As Integer)
  2. DoCmd.OpenForm "YourPatientDetailForm", acNormal, , "PatientNo = " & Me!YourSubformControlName.Form!PatientNo, , acDialog
  3. End Sub
  4.  
May 23 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.