Trying to build a database, with forms for data entry. Dr's. office. I have created the tables, assigned relationships, but when I try to build the form I can only put the fields from two tables in. If i put in additional fields, the form is blank when i switch to look at it. What I basically want to do it have a form where a receptionist can enter data for a patient. Data like name, address etc, plus a medications table, immunizations table, Consultation, History, etc. Need a form structure that will allow all this patient data to be entered and then retrieved when needed. My table structure is such that i have for example, Medications, Immunizations, Consults etc in separate tables. Should they perhaps be in one, the patient main table? I am new to Access, and databases in general. have some knowledge, but obviously not quite enough. Appreciate any help.
No, I think you have them correctly split into other tables, since a patient could have more than one of each (presuming you have a field for patient ID in each table). However, the normal way to present this data in a form would be a subform for each table. In other words, your main form would be bound to the patient table, and you'd have a subform for medications, bound to the medications table. The master/child links would keep the subform in sync with the main form.
Thank you, I think this is getting clearer to me now. So do I create just a plain old form for each of my tables, allergies, meds, etc and if so, how do they become subforms? Is the Master links the connection between the Medications table and Medications form and the child link back to my main form? If that is the case, can you tell me how I would go about structuring this for data entry? For instance, when a patient is being entered into the Main form and I would like to assign certain mediations to that particular patient, how would that get presented to the data entry person so they could access the fields in the Medications, etc tables?
I really appreciate your help. Your one post has already moved me quite a bit farther ahead. I think I have the table structure piece under control, it is just the forms that are causing this mental block.
You can create a form for each table. Then in design view of the main form, click on the subform icon on the design toolbar and click on the desired position in the main form. You should get a wizard asking you for the form to become the subform and the field(s) that links them together. I just noticed this was 2007, so instead of the design toolbar the subform icon will be on the ribbon. I don't have it open right now but I can if you don't find it right off.
By the way, you might find that putting each subform on a tab control will manage the space on the main form better. Depends on the look you want though.
Thanks again. This is now getting clearer to me. I think the tab idea is an excellant one. Can you explain to me how I do that? Do put the tab control on the main form and drag and drop the subform on it? I have worked a little with the tab control, but it brings up two tabs that I can't seem to position correctly on the page. Should I put them in the page header? Have I driven you crazy enough with all of these questions?
Again, thank you very much for your ongoing help.
No problem Danny (I was already crazy ). Generally I'd use the detail section rather than the page header. If you're starting on a new form, put the tab control on the page and size it to taste. Make sure you select the desired page (tab) before putting the subform on a page. It can be easy to put it behind/on top of the tab control so it shows up no matter what page you're on. Not sure what you mean by 2 tabs that you can't position. If you're still struggling, can you post a sample db?
I created the tabs across the top of my main screen and they look good. However, when I drag a form on to the tab from design view of my main page the dragged form is very big and when I look at the form it doesn't hide behind the tabs if you know what i mean. The subform appears on top of items on the main form rather than behind the tab. I am sure this is an example of a "short between the keyboard and the seat" , but I haven't quite got this one yet. I need the tabs to be able to select the appropriate subform from the main page.
Tabs are definitely tricky at first. I just went into 2007, started a new form and bound it to a "main" table. I dropped a tab control onto it, then sized it. I already had a subform built in this db, so it used it. It probably helps to size the subform-to-be to the size you're going to want it to be on the main form before putting it there.
I selected the page I wanted it to be on first, then clicked on the subform icon on the ribbon, then clicked on the page I had selected. Then the wizard came on to walk me through the rest of it.
I just got kicked of the PC I was remoting to, so let me know if that helps.
Here is where I am at. I have created all the forms for all of the tables in my database. I attached the Patients table to the Main form, added the fields I wanted in there. I then put a tab control on the Main form, clicked on the subform , clicked a page in tab control and put each of the other forms, medications,allergies, etc in a separate tab. The problem is that when i go to the Main page, the tab control is showing Page one, the medication table and if i click on any other tab it displays the correct table. What I need to happen is the tabs on the main form to just be tabs, not displaying the medication table when i first open the form. In non database language, I need the other tables to just be tabs on the main page until i select a tab and then need to see the additional tables in their correct size.
I am making headway (I think). I have figured out the tab thing, gotten the form to look like I want, but it is not updating the records according to the PatientID. I have set the Field links in the sub forms as was suggested by the Wizard. I have put a submit button on the main form, but when I add a record it does put it in the main patients table, but the other records I put in the subforms do not appear in the corresponding tables. So I put a submit button on one of the subforms, and as expected it will add the record to the table, but not assigned to the Patient identified on the main form. Obviously I don't have the relationships defined correctly in the Main Form\Sub Form set up, but not sure where I have messed up. Not sure if this will work but i will try and attach the database if you dont mind taking a look at my mess!
Sorry, I got hung up so didn't get a chance to look at this until late, and my eyes are going cross-eyed (been up since way-too-early). Here's a VERY quick and dirty sample of what I had in mind (the forms and subforms with Paul at the end). One difference is that the main form is based on the patients table and displays its fields, rather than a subform. I added a record with data on the subforms, and it all saved as expected. You can get the same look as yours by putting fields from the table on the first tab, rather than a subform, which I did to yours in another very quick and dirty way, and it seemed to work.
My apologies for the rush job. If I've been unclear, let me know and I'll take another crack tomorrow. For now, it's bedtime for Bonzo!