Listview click opens a form RRS feed

  • Question

  • I have a listview box that has columns, and data under each column.  In particular, it is a fun little hospital registration board (practice only) with columns Name, Complaint, and Room.  Under each of these columns are all the patients who are active and present in the hospital.
    The patients are derived from a SQL query, and populated accordingly (each patient has his/her own visit id #).

    What I want to do is, when the end user clicks on a patient, it will open up a form, and that form will pull in the patient's registration/personal info, and make it available for update.

    My trouble is I don't know how to make the listview clickable or pass the visit id parameter to the form I want to open up.

    I've searched the web, and haven't been able to find a great answer.  Can anyone help me?
    Thursday, June 28, 2007 1:10 AM


  • Use the ListView's DoubleClick event to open the form.  Change the form's constructor to take an ID number as an argument.
    Thursday, June 28, 2007 11:12 AM