I’m no Access expert, but I might be able to take a stab at your questions.
Neileg could very well be right. It sounds like you’ve got many patients, and each patient can be diagnosed with more than one illness. Conversely, each illness can correspond to more than one patient. Normalized databases don’t recognize many-to-many relationships; however, this problem is easily solved with a junction table, and perhaps you’ve already taken care of that. Assuming you have, let’s consider your first question.
If you’ve got a combo box that functions perfectly well except for the fact that it displays the autonumber IDs rather than the text fields associated with those IDs, here’s what you can do:
1. Set the combo box’s Column Count property to 2 instead of 1. (I am assuming here that your Diagnoses table has two fields: [ID] and [Diagnosis]. If, for example, the text you want to display is in the third field, you would change Column Count to 3.)
2. Change the Column Widths propery to 0”;1” – and here again, I’m assuming that your Diagnoses table consists of two fields. What you’re actually telling Access here is: make my first field (ID) invisible, and display my second field (text) in a drop-down list that is 1” wide. So, since some of your diagnoses may be long text fields, you may want to set your second column width to 2”, or perhaps even longer.
With regard to your second question, the first step would be to make sure that your database’s structure is normalized. If you’ve got a junction table, you can base a query on it, and then use that query as the row source for your combo box. Though I must admit that I’m a little confused as to why you would want to limit your Cause of Death field to past diagnoses.
As long as we’re being morbid, consider this example: Over the course of one year, let’s say you diagnose Patient A with three ailments: diabetes, Alzheimer’s, and tapeworm. Suppose Patient A later dies, not from any of the aforementioned conditions, but from severe head trauma imposed by a disgruntled spouse. Maybe the cause of death was undiagnosed syphilis, drug overdose, or a boating accident.
It seems to me that not only would you want to avoid limiting the possible causes of death to your previous diagnoses, you may also want to include even more possibilities than what is listed in your Diagnoses table. But then again, I don’t really know what you’re working on and what your logic may be. Like I said, I’m a bit of a noob myself, so I’ll shut up now. Good luck to you…