Can it not be entered manually and an index? My reason for not adding an additional index for this table is that I have an OpenArgs which populates the NHSNumber control in frmAdmissions from frmPatient_Info rmation and I didn't want to lose it
Again, based on your preferences, you wanted to keep the NHS number as your PK. That's fine and it will "work". However, even though you have it set as a Long Integer, it is always numerical characters and you have a proper inputmask/format set for that field, whenever you introduce spaces into a numerical value, you introduce potential problems with how the DB looks at the data. In most cases, there are never any problems--and since we are at the end of the road here, in terms of time, there is no point in changing anything right now.
At the same time, this is also why I cringe at the idea of having a user-entered SG number--as you saw, the possibility of duplicate entries now exists. Again, no point in changing right now, you just need to make sure that users now how important it is to be accurate with their SG numbers.
BTW, not sure how you would lose the NHSNumber?
In a well-designed Admission Form, you would have a main form that selects the Patient (by NHSNumber). This populates the form with all the information associated with the patient, to make sure it is the correct person. Then, you click "Admit Patient" and a subform, based on tblAdmissions appears. Since it is related to tblPatientInfor mation, and the Master/Child relationship between the main form and subform is based on NHSNumber, that value is automatically included in your update of hte Admission information. No need for Open Args or anything else like that. I, myself, was personally amazed at how incredibly simple such a setup really was--I almost don't have to think about building my forms in this way....
Again, just some good stuff to know for the future.
Comment