M
max
Hello,
I'm working on an Access db in VS2005. I have a table, called tblPatients,
in which I have three columns: PatientID (primary key), PatientName and
DoctorName. This table is filled with more than 4.000 records. I load this
table on a form, I make queries, updates, deletion, it does work fine. Then
I have a second form, in which I need to display the two main columns from
tblPatients (PatientName and DoctorName), and some more elements: medical
visits performed (till 5 in the same day), date, fares for each visit, total
amount, and a discount field. The operator starts selecting the Patients
from a ComboBox, which displays automatically its DoctorsName field; it's
fine because the operator doesn't need to choose manually the doctors! This
form loads a second table, called Listing. The columns in this table are:
ListingID (primary key), PatientsID, DoctorsName, Date, Fare1... Fare5,
Total, Discount. I need all these elements are written in this second table.
Well, I have noted that almost all these elements are written, but the items
belonging to "DoctorName", coming from the previous table (tblPatients), are
not physically written in this table, just displayed (correctly), and the
items belonging to "PatientName" are written only in the "PatientID" form
(numbers). I have used a ComboBox for PatientsName, bounded to:
Data Source: tblPatientsBindingSource; Display member: PatientName; Value:
PatientID; Selected Value: ListingBindingSource - PatientID.
Then I have used a TextBox for DoctorName, bounded to:
TblPatientsBindingSource - DoctorName.
I need the items are written in this table in the explicit way (and actually
the DoctorName is not written at all), because then I need to let operator
to perform many queries on it, and he must selects the doctors and the
patients by name, not by an ID.
I didn't write any lines of code, all is written by designer.
Thanks
Max
I'm working on an Access db in VS2005. I have a table, called tblPatients,
in which I have three columns: PatientID (primary key), PatientName and
DoctorName. This table is filled with more than 4.000 records. I load this
table on a form, I make queries, updates, deletion, it does work fine. Then
I have a second form, in which I need to display the two main columns from
tblPatients (PatientName and DoctorName), and some more elements: medical
visits performed (till 5 in the same day), date, fares for each visit, total
amount, and a discount field. The operator starts selecting the Patients
from a ComboBox, which displays automatically its DoctorsName field; it's
fine because the operator doesn't need to choose manually the doctors! This
form loads a second table, called Listing. The columns in this table are:
ListingID (primary key), PatientsID, DoctorsName, Date, Fare1... Fare5,
Total, Discount. I need all these elements are written in this second table.
Well, I have noted that almost all these elements are written, but the items
belonging to "DoctorName", coming from the previous table (tblPatients), are
not physically written in this table, just displayed (correctly), and the
items belonging to "PatientName" are written only in the "PatientID" form
(numbers). I have used a ComboBox for PatientsName, bounded to:
Data Source: tblPatientsBindingSource; Display member: PatientName; Value:
PatientID; Selected Value: ListingBindingSource - PatientID.
Then I have used a TextBox for DoctorName, bounded to:
TblPatientsBindingSource - DoctorName.
I need the items are written in this table in the explicit way (and actually
the DoctorName is not written at all), because then I need to let operator
to perform many queries on it, and he must selects the doctors and the
patients by name, not by an ID.
I didn't write any lines of code, all is written by designer.
Thanks
Max