Page 1 of 3 123 LastLast
Results 1 to 15 of 44
  1. #1
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183

    Subform problem

    with the help of the members of this forum, I was able to create the search form.


    However, when I click on to EDIT a record , the subform does not match what I am looking for. Could it be the filter problem? Please help.. I have attached a file here




    Thank you

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    It is working correctly as designed. If it's not what you want that is issue.

    The fsfrSearchPatient shows 6 records, 3 are for studyID 14 and 3 are for studyID 15. When I click Edit, FrmAuditTool opens to the correct study record.

    What do you want to happen?
    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.

  3. #3
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    Quote Originally Posted by June7 View Post
    It is working correctly as designed. If it's not what you want that is issue.

    The fsfrSearchPatient shows 6 records, 3 are for studyID 14 and 3 are for studyID 15. When I click Edit, FrmAuditTool opens to the correct study record.

    What do you want to happen?

    If you see the search form.. the TIME is different even though the date might be same.
    Each study id could have multiple date/time

    If you click to study id 54 - LUNCH - EDIT command, it pulls up A.M.

    Did you get what I am trying to explain?

  4. #4
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    Quote Originally Posted by June7 View Post
    It is working correctly as designed. If it's not what you want that is issue.

    The fsfrSearchPatient shows 6 records, 3 are for studyID 14 and 3 are for studyID 15. When I click Edit, FrmAuditTool opens to the correct study record.

    What do you want to happen?

    Its the subform which is not filtered properly :S
    The main form works fine

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    The subform CopyFrmAuditTool retrieves all Table records that relate to the study ID. You see only the first one because the subform is in Single Record view and the Navigation bar is disabled so can't move to the other records. The form/subform synchronization is working. If you want to see all the subform related records, set it to Datasheet view or Continuous view where you can arrange the controls to look like datasheet.
    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. #6
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    Quote Originally Posted by June7 View Post
    The subform CopyFrmAuditTool retrieves all Table records that relate to the study ID. You see only the first one because the subform is in Single Record view and the Navigation bar is disabled so can't move to the other records. The form/subform synchronization is working. If you want to see all the subform related records, set it to Datasheet view or Continuous view where you can arrange the controls to look like datasheet.

    I just tried setting it to continuous form. It still did not work

    I did not want datasheet view because I want it to display as form.

    So which means it won't be possible then?

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    I don't really understand what you need. The Edit button runs code to open form filtered by studyID. That form has a subform with related records. They are synchronized.

    Nothing in code is filtering the subform. What filter criteria do you want applied to the subform? If you really want to see only one record from Table then definitely not going about this right.
    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. #8
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    Quote Originally Posted by June7 View Post
    I don't really understand what you need. The Edit button runs code to open form filtered by studyID. That form has a subform with related records. They are synchronized.

    Nothing in code is filtering the subform. What filter criteria do you want applied to the subform? If you really want to see only one record from Table then definitely not going about this right.

    Oh.. because subform is linked to another table and each TIME period (i.e. A.M., PM or Lunch) has different ID assigned to it.

    Each Study ID can have 3 different TIME period.

    Maybe I should create three separate forms for each TIME period?

  9. #9
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    If you see. There are two tables.

    I know it is complicated. I might have done it the wrong way

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    I would not create 3 identical forms. Design maintenance headache. Just need to figure out what you want to do and construct form to accomplish it.

    Do you want to be able to edit the parent study info from tblAudit on the AuditTool form? If not, then suggest don't need form/subform arrangement. You want to open a form to edit a single existing Table record?
    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.

  11. #11
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    Quote Originally Posted by June7 View Post
    I would not create 3 identical forms. Design maintenance headache. Just need to figure out what you want to do and construct form to accomplish it.

    Do you want to be able to edit the parent study info from tblAudit on the AuditTool form? If not, then suggest don't need form/subform arrangement. You want to open a form to edit a single existing Table record?


    I am planning to have the parent study information from tblAudit form locked when the user is in the edit mode/AuditTool form.

    I would like the user to be able to edit only the subform area.

    for example - In the search form, the LAST NAME "54" has three records saved already... A.M., P.M. and LUNCH

    so what I am looking for is that if the user click on to LAST NAME "54" AND P.M. row/EDIT in the SEARCHED FORM.. The form which opens up should show P.M. record in the subform.

    The parent/main form stays the same for all TIME period

  12. #12
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    oh.. so you mean to say.. just have one form but the fields linked to different tables?

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Yes, one form set up to allow edit of only the info from Table. Form would open filtered to the correct study and period. The RecordSource for the form would be a query that joins the tables (like the Search form), but only the controls bound to Table fields would be set to allow edits. I would probably make one form to serve as both search and edit. This tutorial shows what I mean http://datapigtechnologies.com/flash...tomfilter.html.

    Clarify relationship of patients to studies - one-to-one, one-to-many, many-to-many?
    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. #14
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    its one-to-many

    ok. .will go over the tutorial now
    thanks

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    A study will have many patients but patient will be in only one study? Do you intend to have a table for patient info?
    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 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Subform Problem!
    By tramp82 in forum Forms
    Replies: 4
    Last Post: 10-13-2011, 08:46 AM
  2. Form / subform problem
    By ksmith in forum Programming
    Replies: 5
    Last Post: 08-30-2011, 07:33 AM
  3. Subform Problem
    By nchesebro in forum Forms
    Replies: 7
    Last Post: 08-03-2011, 05:24 PM
  4. Replies: 2
    Last Post: 06-14-2010, 03:25 PM
  5. problem with subform
    By dimension in forum Forms
    Replies: 1
    Last Post: 05-28-2009, 05:32 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