M
max
Hello,
I have a VS2005 framework and ado.net.
I have an access db with two tables:
1) Patients;
2) Doctors.
The 'Patients table is already filled by a long list of records (coming from
an old access db) in 3 columns: ID, Name, Doctorname (for that patient);
The Doctors table is filled by only a column: Doctorname, which is a current
list of doctors working here at now.
I want put on a form just the 'Patient' table, with a combobox for Doctor
field that must display the actual doctor for the selected patient, and the
list (dropdown) for the Doctor's name coming from the 'Doctor' table, which
could be different from the Doctor's names, meaning that this list reflects
only the actual doctors working here, while in the patients table (old since
5 years) there are also some doctors that are not working here anymore. It
means that if I add a new patient, I can have only the actual doctor as the
current list (in the dropdown) and not the old. The same is if I want to
change the doctor for a patient which was cured from a doctor which doesn't
work here now.
I put the following combination in the databinding properties of this
combobox:
Datasource: tblDoctorsbindingsource
Display member: Doctorname
Value member: Doctorname
Selected value: tblPatientsbindingsource-Doctorname
When I run the project, and go scrolling records, in the Doctor field I get
the right actual doctor for the patient, but when I click on the arrow, I
see a confused list of doctors, with some name in the beginning and then
repeated below. The list was sorted at the beginning.
What does it mean?
Any help would be welcomed.
Thanks.
Max
I have a VS2005 framework and ado.net.
I have an access db with two tables:
1) Patients;
2) Doctors.
The 'Patients table is already filled by a long list of records (coming from
an old access db) in 3 columns: ID, Name, Doctorname (for that patient);
The Doctors table is filled by only a column: Doctorname, which is a current
list of doctors working here at now.
I want put on a form just the 'Patient' table, with a combobox for Doctor
field that must display the actual doctor for the selected patient, and the
list (dropdown) for the Doctor's name coming from the 'Doctor' table, which
could be different from the Doctor's names, meaning that this list reflects
only the actual doctors working here, while in the patients table (old since
5 years) there are also some doctors that are not working here anymore. It
means that if I add a new patient, I can have only the actual doctor as the
current list (in the dropdown) and not the old. The same is if I want to
change the doctor for a patient which was cured from a doctor which doesn't
work here now.
I put the following combination in the databinding properties of this
combobox:
Datasource: tblDoctorsbindingsource
Display member: Doctorname
Value member: Doctorname
Selected value: tblPatientsbindingsource-Doctorname
When I run the project, and go scrolling records, in the Doctor field I get
the right actual doctor for the patient, but when I click on the arrow, I
see a confused list of doctors, with some name in the beginning and then
repeated below. The list was sorted at the beginning.
What does it mean?
Any help would be welcomed.
Thanks.
Max