Subform not visible

Okay ... must be having a senior moment ... here is the updated zip with more taken out. Originally tried to send it unzipped.

Thanks
 

Attachments

Okay, the main problem about the subform not showing up is that you have the main form's ALLOW EDITS set to NO. They have to be YES.

Second, I redid your two tables a bit and the relationships and the form so that it would be more correct. So that is my suggestion. I would not use DATE as the linking factor. I would use an ID number which can be shared amongst tables (see how I did it in this case). You currently don't have a primary key set in your tables which is not really good. And not only that, but joining on DATE would make it so that it is only really good for ONE record per date but if that's what you need then you should remove the DOB From the subform and its table (one place is sufficient) and then your relationships should set a composite key on DATE and PHYSICIAN. But I'd avoid composite keys if at all possible and just use the method in my revision of your database.

Let me know if you have questions.
 

Attachments

Bob

Thank you very much for the help and making revisions. I will go through it and I am sure I will be back to you with what will seamingly very fundamental questions. I am still learning.

Dan
 
Hi Bob,

Let's see if I understand what you did.
First, I understand the ALLOW EDITS mistake.

Next the auto number ID field serves as the common field between the two tables so would that be the identifier to use in the seard of data from both tables? Could you use visitdate in the same fashion? Also you, made the auto number ID the primary key field. Again if I needed to use visit date would I make that the primary key field? (I will need to review primary keys again)

You changed the realtionship to one to many? Why is it not one to one?

Thanks
Dan
 
1. You can't use Visit Date as the primary key or else you'll end up with being able to have ONLY ONE visit per date (so only one patient per date).

2. The One-to-Many is not a problem really. You can limit it to one record for the visit using a multi-field index. You might be able to do it otherwise with a composite key but those are really not that great because you have to store all of the parts in each table where you don't have to when using a single ID.

3. An autonumber ID is preferable (in my opinion) as it is a single number which is guaranteed to give you a unique number. It is for the use of the system and you, nor your users, should care what it is as it isn't normally used in a visible sense.
 
Okay that makes sense now.

I will no doubt be adding other tables down the road and will keep all of this in mind when I do.

Thanks for your assistance ... and no doubt I will be back to the forum with more questions looking for help.

Dan
 

Users who are viewing this thread

Back
Top Bottom