Best way to design a form

Sasoriza28

Registered User.
Local time
Today, 08:42
Joined
Aug 13, 2012
Messages
13
What is the best way to design a form to add snacks to my 10am, 3pm and HS snack tables? I need the name and room number in the form to know who I am adding data for since my snack stables only have a key and foreign key linking it to the main table. Preferably, it would be one form to add to all 3 tables. I need to be able to make multiple entries for "snack time". If you have any suggestions on how to design the form or how to better organize my tables, please let me know.
I've attached my database. Thanks in advance.
 

Attachments

A few things to not:

1) You should only have one table named Snacks, with a field named "SnackType". That's where you enter 10AM, 3AM or HS.

2) The master list should have a snack ID field where you enter the snack, not the other way around. You need to adjust your relationships.

Once your table structure is adjusted, adding snacks will become a lot easier. Most of your changes will take place in your master list not in the snacks table.
 
Would this work the same if one person was getting 2 10AM snacks, another getting one snack at each time and another just getting one snack at 3pm?
 
Ok so I think I did it right. I have snackID in the master list. Another snack table with the primary key, snack type and snack time. I have "snackID" from the master list linked to the primary key from the snack table. I still can't seem to get a form where I can pick a patients name from a list so I know who I am adding a snack to.
 
Great! The next thing you need to do is have a Patients' Detail table. That's where you store their info ONLY, no snacks, entries nothing. Then you can have a one to many relationship (One patient Many Master Lists).

I would also make a separate table for OrderedSnacks. Many-Many relationship to Master List. Simply because one master list can have many snacks, and one snack can have many master lists. Then, if you want to restrict snacks to 3 only, you can always run a DCount function before inserting a new OrderedSnack.

Hope I didn't confuse you?
 
ok I don't know if I need a snack type table and a snack ordered table. The type of snack they could ask for is infinite so I would just have them type it in. Would that mess anything up? Also is there a way for the ID on the master table to automatically be the same as the linked ID for snacks or are they going to have to type it in every time?
 

Users who are viewing this thread

Back
Top Bottom