Results 1 to 13 of 13
  1. #1
    Join Date
    Jun 2008
    Posts
    7

    Unanswered: Access 2007 Form Creation

    Hi there,
    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.

    Danny

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    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.
    Paul

  3. #3
    Join Date
    Jun 2008
    Posts
    7

    Forms in Access 2007

    Paul,
    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.

    Thanks,
    Danny

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    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.
    Paul

  5. #5
    Join Date
    Jun 2008
    Posts
    7

    Getting clearer

    Paul,
    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.
    Danny

  6. #6
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    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?
    Paul

  7. #7
    Join Date
    Jun 2008
    Posts
    7

    Tab Controls

    Paul,
    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.
    Thanks,
    Danny

  8. #8
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    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.
    Paul

  9. #9
    Join Date
    Jun 2008
    Posts
    7

    Status

    Hi Paul,
    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.

    Does any of that make sense?
    Thanks,
    Danny

  10. #10
    Join Date
    Jun 2008
    Posts
    7

    Update

    Paul,
    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!
    Thanks,
    Danny
    Attached Files Attached Files

  11. #11
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    I'll look at it this evening Danny. My laptop with 2007 on it is at home.
    Paul

  12. #12
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    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!
    Attached Files Attached Files
    Paul

  13. #13
    Join Date
    Jun 2008
    Posts
    7
    Paul,
    Just got back here myself. Gotta get rid of this day job!! thanks for your work. I will take a look and get back to you.
    Danny

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •