Page 3 of 5 FirstFirst 12345 LastLast
Results 31 to 45 of 68
  1. #31
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Another 'primary key' field is not required in the junction table unless it will have a related child table that will need the pk as fk.



    You could set the PatientID and ProviderID as compound PK to prevent duplicate pairings.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  2. #32
    charlesh is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Ms.
    Posts
    35
    HI,

    I created the "SubForm" for my project. I first created a form for the "Provider", then the subform for the "Patient".
    The Form for the provider appeared as I would like. However, the subform for the "Patient" looks just like the "tbl" for the patient.
    I may or may not be doing this the right way. But, what I was hoping for is the form to look like as I have attached in my first post.
    It will look more like a userform in Excel.
    If there is a way to do it please proved sample attachment.


    Charles

  3. #33
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    A form used as a subform can be set to Datasheet, Continuous, or Single view as long the it doesn't also have a subform. Just set the DefaultView property of the form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #34
    charlesh is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Ms.
    Posts
    35
    Hi,

    Thanks.
    I have the form the way I want. Now to the task of getting the data to be displayed with the selection of the "Provider" and have this selection populate the "Patients" combo with no dupes.

    Charles

  5. #35
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    I will offer again that filtering the combobox really doesn't make sense to me. Certainly not if the combobox is bound. The subform records should synchronize with the main form but if you want to be able to create new associations between provider and patient, the combobox should not be filtered.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #36
    charlesh is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Ms.
    Posts
    35
    Hi,

    The ref to dup was just an expression.
    I would assume for the Patient combo you would
    Select the "Patient" from the table for Patient/Provider to do so you would have the "Provider" selection from the combobox then
    look at the tbl for Patient/Provider look for the "Providers" listed. This in turn would then populate the "Patients" combo.

    Charles

  7. #37
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Perhaps I don't understand what you want to use this form/subform and combobox for. If you want to do data entry and want to be able to create NEW provider/patient associations, the bound combobox in subform could list only patients NOT yet associated with provider. Restricting the combobox to list only patients already associated with provider negates the functionality for creating new associations.

    However, this combobox will have to use lookup alias and filtered combobox RowSource with lookup alias will not work nice with continuous or datasheet form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #38
    charlesh is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Ms.
    Posts
    35
    Hi,

    The concept is for the user to "Add" or "Update" existing Data.
    The "Add" will be used when the "User" selects an existing "Provider".
    They will then enter the Patient name and all related info. Then click the "Add" button. This action will populate the spreadsheet to the last row.
    Now, if they need to modify a record for a patient they will select the "Provider" then the "Patient". They will review the data displayed and if a correction is required they will make the correction and click the "Update". If the recored being displayed is not the one they are looking for they will click the "Next" button until the record that needs to updated is displayed. But, they will then be able to go back to the "Previous" record if necessary.

  9. #39
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    My comments about bound combobox unchanged.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #40
    charlesh is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Ms.
    Posts
    35
    Hi,

    I have both forms set to "Single View". Will that pose a problem?
    Also, if all else fails I'll assume I can do what I want with code.
    If set with code then I could use only one form. Correct?
    Other that that what could you suggest to accomplish what I want?


    Charles

  11. #41
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Okay, sounds like you need two comboboxes.

    1. an UNBOUND combobox in subform header section that can be used to select a patient for filter criteria. That combobox would have a RowSource limited to patients already associated with provider. The RowSource would be a query that joins Patients and Provider/Patients tables so you will have the patient name for display. The WHERE clause will reference the ProviderID value on main form. Use query build to help construct the SQL statement.

    2. a BOUND combobox in the detail section to select patient in new record. Could have code that would lock this combobox if the current record is not NEW.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #42
    charlesh is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Ms.
    Posts
    35
    HI,

    Thanks for the info. I now have the combobox for "Provider" and "Patient" working.
    When I select the Provider the Patient combo list all of the "Patient" names.
    For the "Patient" name I can see a selection box for them. If I select a patient and when done with the patient I close the form.
    When I re open the form I do not want the "Provider" "Patient" name to be displayed.

  13. #43
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Don't understand. Don't want them to show where? The form opens to existing records. Data will show.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  14. #44
    charlesh is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Ms.
    Posts
    35
    When the form opens Provider and Patient show show blank.
    Also when I select a different Provider I want the Patient combo display to be "".
    Currently when Change the Provider I can still see the previous "Patient" name and when I look at the combo for the Patient I can see their name for the current provider.
    I would like to cleat the Patient Name when a different provider is selected.

    Charles

  15. #45
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Which combos are you referring to? The filter criteria combobox which should be UNBOUND? Or the data entry combobox which should be BOUND?

    Will have to use code in provider combobox AfterUpdate event to set the filter criteria patient combobox to null.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 3 of 5 FirstFirst 12345 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 07-21-2013, 10:43 PM
  2. Replies: 12
    Last Post: 10-27-2012, 05:44 AM
  3. Replies: 5
    Last Post: 08-21-2012, 12:30 PM
  4. Use VBA to edit record or create new record in a query
    By ryantam626 in forum Programming
    Replies: 11
    Last Post: 08-09-2012, 02:37 AM
  5. Replies: 22
    Last Post: 06-12-2012, 10:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums