Results 1 to 8 of 8
  1. #1
    VeganLiving is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2013
    Posts
    13

    HELP Subform is producing multiple records

    Hello,

    I am having a problem with my subform that is populated when a value is clicked on a combobox in the main form.
    I have the code in each text box in the subform correctly to pull the correct field that is hidden in the combo box.
    Example:
    =[Forms]![Data Dictionary-Look up Business Name]![cboTECH].[Column](5)



    When go to Form View and chose a value from the combo box the subform shows the right records A MILLION times (well not a million). I have many subforms in my Forms so I didn't do anything different when creating this one. PLEASE HELP.
    Click image for larger version. 

Name:	subform1.jpg 
Views:	13 
Size:	77.0 KB 
ID:	13511

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Probably because the subform has a RecordSource that is a query joining several 'many' tables. Post the sql statement of subform RecordSource.
    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
    VeganLiving is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2013
    Posts
    13
    I'm using a view that was created for my display forms. So it's only 1 table that I'm using.
    In the subform Record Source this is my SQL:
    SELECT NEXTGENERA_V_CMB_METAFIELDS2.DB_SCH, NEXTGENERA_V_CMB_METAFIELDS2.DB_OBJ_NAME, NEXTGENERA_V_CMB_METAFIELDS2.DB_COL_NAME, NEXTGENERA_V_CMB_METAFIELDS2.DATA_TYPE, NEXTGENERA_V_CMB_METAFIELDS2.DATA_LENGTH
    FROM NEXTGENERA_V_CMB_METAFIELDS2;

    I did try to change the Record Source to just the table name and it didn't make a different.
    I also have only 1 Master/Child fields because when I try and add multiple fields it does not show any records in my subform.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    So the issue is with the Master/Child linking because requires a compound primary/foreign key to establish unique identifier? What is the main form RecordSource?

    Is this form/subform used for data entry/edit?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

  5. #5
    VeganLiving is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2013
    Posts
    13
    The record source for the Main Form is :
    NEXTGENERA_V_CMB_METAFIELDS2

    This is just a data dictionary that displays table information. No edit/delete/add.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    So the main form and the subform have the same data source. Why?

    Options I would go with:

    1. one form in continuous view and put the filter inputs in form header

    2. do not link the main form and subform and apply filter to the subform dataset

    BTW, I hope those controls used to input filter criteria are UNBOUND.
    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.

  7. #7
    VeganLiving is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2013
    Posts
    13
    I wish I could use a continuous form but my manager wants the forms to look a certain way.
    As for the linking the subform and the main form I have removed the Master/Child links and i'm still having the issue.

    Here is what is coded in the subform text boxes.


    Click image for larger version. 

Name:	subform2.jpg 
Views:	7 
Size:	177.2 KB 
ID:	13525

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Controls can be arranged on continuous form to look much like a datasheet.

    I don't understand textboxes in subform referencing main form combobox columns. Of course those values will display on every record of the subform and appear as 'duplicates'.
    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.

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

Similar Threads

  1. Using form/subform for multiple records
    By silentsiren76 in forum Forms
    Replies: 1
    Last Post: 05-17-2013, 11:17 AM
  2. Replies: 15
    Last Post: 10-22-2012, 06:06 PM
  3. Multiple Records from a Form/Subform
    By Schowti in forum Access
    Replies: 39
    Last Post: 06-18-2012, 01:32 PM
  4. Multiple records in a subform
    By rashima in forum Forms
    Replies: 4
    Last Post: 05-15-2012, 09:50 PM
  5. Multiple Subform records
    By Lupson2011 in forum Access
    Replies: 2
    Last Post: 08-24-2011, 08:49 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