M
Max
"Branco Medeiros" > It will always depend on how you generate these IDs (I
must warn you
Probably I cannot explain as I'd like. I think autoID is ok for me, because
the five tables must be changed independently from the rest of the
application. The visit tables, called tblPrest1... tblPrest5 (formed by
three columns: ID, Price, and type of visit) are just like a collection of
about 70 records. I mean, I have a menu--->tools--->Change visit table; it
loads a form with the first table; I make all the changes on it, then save
on the binding navigator. At this point, changes must be reflected on the
other four tables.
Next, when I want to open the Visit form, which writes in the Visit table, I
see my five drop down combobox, showing all the records loaded from the
visit table; next, I choose the type of visit, choose how many visits has
been made to that patient by clicking in combobox and leaving the other
combobox blank if visits are < 5, choose date, patient, doctor and stop.
Saving now writes a new record in the Visit table, which has an ID
independent from the other tables.
Thanks for your patience.
must warn you
that there are lots of lines of thought in this matter, every one
claiming to be the definitive one).
Personaly, I prefer having a table's ID/PK as an identity column
managed by the system (an autoincrement column, in Access), . Other
people may prefer to generate the keys themselves. Others still will
prefer to use something completely meaningless, say, a GUID, or
whatever (btw, I am, too, among the ones that think that the PK is
meant *only* to pinpoint a given record, but I prefer using a
light-weight identity column for that).
Autoincrement IDs are completely ruled out, for you. Because they're
managed by the DB engine, as soon as you have a situation with, say,
three visits only, the two other tables will become out of synch with
the other three. And it will only get worse after that.
Probably I cannot explain as I'd like. I think autoID is ok for me, because
the five tables must be changed independently from the rest of the
application. The visit tables, called tblPrest1... tblPrest5 (formed by
three columns: ID, Price, and type of visit) are just like a collection of
about 70 records. I mean, I have a menu--->tools--->Change visit table; it
loads a form with the first table; I make all the changes on it, then save
on the binding navigator. At this point, changes must be reflected on the
other four tables.
Next, when I want to open the Visit form, which writes in the Visit table, I
see my five drop down combobox, showing all the records loaded from the
visit table; next, I choose the type of visit, choose how many visits has
been made to that patient by clicking in combobox and leaving the other
combobox blank if visits are < 5, choose date, patient, doctor and stop.
Saving now writes a new record in the Visit table, which has an ID
independent from the other tables.
Thanks for your patience.