Creating Relationships - Required?

Not sure what your main problems is.

Could you explain it again.

Don't go overboard with a long story. Just detail you biggest problem you have at the moment. Hopefully we can fix than then move onto the next.
 

Attachments

Last edited:
OK,

Just to quickly summarize:

I have many Patients that will have many meal plans prepared for them. This means that each Patient can have many meal plans. Within my database, there will be many foods that can be associated with many meals.

Therefore, I plan to accomplish the task with two junction tables (same as I posted recently).

My current dilemma now is populating those tables. I am starting by creating a form. However, should my form use the fields within the junction table? Or the original table that the associated field originates (the ones within the junction table)?

Basically, how do the junction tables get populated?
 
I can only see one Junction table. This table does not have to have every possible combination.

Populate as you need a new combination.

I think I need to explain how to populate in better detail.

Would I be correct in saying that the Meals and Food will change over time. Mainly new ones will get added.

It is Mid Afternoon here. I will try to do some work on this tonight. That is unless someone else beats me to it. Hint Hint

NOT SURE BUT I COULD BE WRONG. PLEASE READ NEXT POSTS.
 
Last edited:
Can you upload your latest version with those alterations I suggested,

I would like this ASAP. If you can.
 
Can you upload your latest version with those alterations I suggested,

I would like this ASAP. If you can.

Leo

Have you gone walkabout?

I could really do with the latest that you have.

I may just have to wait until tomorrow. But I will keep checking to see if you have posted.
 
Leo

To populate a table like this I would first of all create a separate table that has been populated with all known choices.

A separate Table for each field.

You would then populate this join table with a Combo Box. It is the primary key you would use not the actual details. Hopefully you are using an Auto Number as your Primary Key.

Does this help.
 
I'm also trying to understand this structure and learn relationships. I'm wondering this DB design involves only few tables and it is difficult to design. My DB is a disaster then, which has many tables relationship and as a beginner I'm in big trouble.
I feel there's going to be one junction table, i.e. Meals.
Each meal will comprise of a set from Food table.
Food and Meals table will be in many-to-many relationship.
Each patient will consist of 1 or more meals.
Patients table will be in relationship of one-to-many with meals table.
Any history in any table will be achieved by Start/End Date columns.

Does this initial design sorts anything for you please??
 
Last edited:
I'm also trying to understand this structure and learn relationships. I'm wondering this DB design involves only few tables and it is difficult to design. My DB is a disaster then, which has many tables relationship and as a beginner I'm in big trouble.
I feel there's going to be one junction table, i.e. Meals.
Each meal will comprise of a set from Food table.
Food and Meals table will be in many-to-many relationship.
Each patient will consist of 1 or more meals.
Patients table will be in relationship of one-to-many with meals table.
Any history in any table will be achieved by Start/End Date columns.

Does this initial design sorts anything for you please??

I would suggest that you start a new thread of your own.

You will get the attention that you need rather than mix up with someone else's problem.

You could include a link back to this thread if you want.
 
I would suggest that you start a new thread of your own.

You will get the attention that you need rather than mix up with someone else's problem.

You could include a link back to this thread if you want.

I'll paste my structure because I'm still talking the Engineering Department.

I'm following this thread to understand relationship and my opinions on how to get things right. Then more experienced users like yourself will improve my suggestion.

Rest assure, I'm not trying to mix anything up here )
 
I'll paste my structure because I'm still talking the Engineering Department.

I'm following this thread to understand relationship and my opinions on how to get things right. Then more experienced users like yourself will improve my suggestion.

Rest assure, I'm not trying to mix anything up here )

I just wanted to point you in a better direction so that you can get the best of help. I wish you well with your project and I trust we can be of help.
 
Rain,

Have you gone walkabout?

Sorry about my absents after asking you a question, I had to put this project aside to work on another project that needed my attention.

Would I be correct in saying that the Meals and Food will change over time. Mainly new ones will get added.

Yes, the intent is to add additional food items.

I just uploaded my latest edition of my database. I have been reading up on the next step - creating forms. However, as I originally mention; I don't understand how my junction table gets populated. Ideally, I would like to create a form for the Foods table so that we could introduce new items as they become available / needed.

The process is a patient can have multiple meal plans (breakfast, lunch, dinner). Each meal is going to be made from many food items.
 

Attachments

Rain has probably given up because he can't navigate the site and find your posts any more. Something has really screwed up with the site. Can't get the list of recent posts or the list of one's own posts. Stylesheet isn't loading. I am also having problems where the carriage returns are dropped when I post from IE11. Argghh!
 
Something has really screwed up with the site. Can't get the list of recent posts or the list of one's own posts

I am sorry to hear that...:(

Have you scan your system for any rouge threats? I am using IE 11 (11.0.17 to be exact) and I am not experiencing any of the issues that you have described. I even quickly received a notice of your posting. I also just navigated to other topics (looking for trouble) and all is well.
 
The problems are happening on entirely unrelated computers and I am not the only one. Rain says he won't be back until it is fixed.----------------

Navigation to other topics is fine. NewPosts is fine. --------------------

Try QuickLinks. It used to drop down to a list including Recent Posts which returned post in the past 24 hours. ------------

Go to a user's page. There used to be menus to find post by and post started by the user. Not there now. ------------------

CSS is working fine on the main pages but this will be coming out of a cached copy of the style sheet. Doesn't work at all in Chrome on this computer because I don't normally use it with this site so there is no caches stylesheet. ----------------
 
A miracle. Suddenly it is all working again. On some pages. Sometimes. Looks like the trouble with the menus might begin when a post is edited.
 
I missed it...

But that is good. However, I don't reference the Quick Links drop down often. Therefore, I overlooked it.

Glad to hear everything is working again :)
 
A miracle. Suddenly it is all working again. On some pages. Sometimes. Looks like the trouble with the menus might begin when a post is edited.

MateLook a bit further. At first things look ok but then it goes to putty.I have Quick Links showing at the moment but one I click on it I go no where.Its enough to make a man drink. Coca Cola that is. The other stuff is evil, so I found out.
 
Leo Sorry for being a pain, but you need to learn the right way of doing things. Not as though I can say you are totally wrong but fixing a few small thing makes life easier as you develop more and more. I think you were told this before and I know it is trivial but it is still important. Do not use Spaces, - Hyphens, # Hash Sign. I don't even use the _ underscore. Please do not get over worried about the populating of Data. I will show you a fancy way of doing it soon.
 
LeoThe attached is a couple of methods to add new data.First Populate the table with a few records just so you can test that things are working.Then use the Code etc attached to the Database I am uploading. It works from the "Not in List" event of the control/Text Box within the form. If you enter something that is not on the list it pops up a screen to ask if you want to add it. If you follow the prompts the new data will be saved to the table and be available next time you wish to use it.This is a slow process in the beginning as there is a lot to add. As time goes on it becomes less and less.Pull my database apart and see how things work. It is actually very simple.Have a go and while you are at it fix those naming errors then when ready post back with a copy of what you have.Note, my Database has different names to yours and was written years ago. You will have to change some words to fit in with your design.
Sorry it won't let me attach a file. Will have to wait until it is fixed.
 
Rain,

Here is an update of what I have been doing (see the attached database). Needless for me to admit…I am lost! I have been attempting to play around and make my relationships work? I created one form and added my patient information while linking them to the foods table.

I don't want to confuse things too much until I have grasp this concept. But, I what I would like to archive is to use the tab control option within the form design so that I can have a table on each tab - one for Breakfast, Lunch and Dinner planning menus. Within each of the tabs would be a sub form (Continuous) so that the food items can be selected or added if not available.

That is my goal to archive happen with my table relationships.
 

Attachments

Users who are viewing this thread

Back
Top Bottom