Results 1 to 4 of 4
  1. #1
    kretzsc is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    2

    how do I get a subform to link to a main form

    I have the following query on my main form i am using a combo box to try to link to my subform. The subform shows the first records data but when I select another value from the drop down the subform doesn't update. It's like they aren't really linked.

    Query from main form
    SELECT DISTINCT Left([BUS_KEY],InStr([BUS_KEY],'-')-1) AS policy_id


    FROM IIWSCREF_IIW_BUS_KEY_XREF
    WHERE (((IIWSCREF_IIW_BUS_KEY_XREF.IIW_TRGT_TBL_NM)="FIN _PROV"));
    Query from subform
    SELECT IIWSC_FIN_PROV_DETAIL.FIN_PROV_DETAIL_ID, IIWSC_FIN_PROV_DETAIL.FIN_PROV_ID, IIWSC_FIN_PROV_DETAIL.POPULATION_INFO_ID, IIWSC_IIW_TYPE.TYPE_DESCRIPTION, IIWSC_FIN_PROV_DETAIL.EFFECTIVE_FROM_DATE, IIWSC_FIN_PROV_DETAIL.EFFECTIVE_TO_DATE, IIWSC_FIN_PROV_DETAIL.ORIGINAL_EFFECTIVE_TO_DATE, IIWSC_FIN_PROV_DETAIL.VALID_FROM_DATE, IIWSC_FIN_PROV_DETAIL.VALID_TO_DATE, IIWSC_FIN_PROV_DETAIL.OOS_REVERT_IND, IIWSC_FIN_PROV_DETAIL.ADDED_REQUEST_ID, IIWSC_FIN_PROV_DETAIL.DETAIL_KIND, IIWSC_FIN_PROV_DETAIL.DETAIL_TYPE, IIWSC_FIN_PROV_DETAIL.DETAIL_SUBTYPE, IIWSC_FIN_PROV_DETAIL.DETAIL_AMOUNT, IIWSC_FIN_PROV_DETAIL.EXTERNAL_REFERENCE_DS, IIWSC_FIN_PROV_DETAIL.DETAIL_DESCRIPTOR, Left([EXTERNAL_REFERENCE_DS],InStr([EXTERNAL_REFERENCE_DS],'-')-1) AS Expr1, IIWSC_FIN_PROV_DETAIL.CURRENT_RECORD_FL
    FROM IIWSC_IIW_TYPE INNER JOIN IIWSC_FIN_PROV_DETAIL ON IIWSC_IIW_TYPE.TYPE_ID = IIWSC_FIN_PROV_DETAIL.TYPE_ID
    ORDER BY IIWSC_FIN_PROV_DETAIL.EXTERNAL_REFERENCE_DS;


    I am liking policyid to Expr1

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Have you set the "Link Child Fields" and the "Link Master Fields" properties of the subform?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    kretzsc is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    2
    Yes. I set both of those properties. It works great if I link the uneditied field - BUS_KEY AND EXTERNAL_REFERENCE_DS. It appears the problem is when I try to use the string functions and then use those modified fields in the link master and child fields. Is there a problem with using a modified field vs. a straight field from the table?

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Hi

    You could try to requery the subform in the AfterUpdate event of the combo box.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Totals from subform to main form
    By kathi2005 in forum Forms
    Replies: 4
    Last Post: 11-04-2011, 10:19 AM
  2. Replies: 2
    Last Post: 08-01-2011, 11:35 PM
  3. Controlling Subform from Main Form
    By SteveF in forum Forms
    Replies: 5
    Last Post: 07-01-2011, 05:32 PM
  4. opening a second form from main/subform
    By PJPCVP in forum Database Design
    Replies: 1
    Last Post: 10-29-2010, 09:50 PM
  5. Subform vs main form calculation
    By fadone in forum Forms
    Replies: 17
    Last Post: 12-21-2005, 07:27 AM

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