Results 1 to 6 of 6
  1. #1
    rrum is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    5

    Record added to subform creates a record in the lookup query

    I have a subform with a combo box based on a lookup query. For some reason, everytime I enter a new record in the subform, using a value in the combo box, it also puts a new record in the tables of the lookup query, which creates duplicate lookup records. Can anyone help with this issue? Thanks in advance!

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    The lookup query has the same ecord source as the suform. The lookup query is probably not filtered correctly.

  3. #3
    rrum is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    5
    I appreciate your help. Can you please tell me an example of how it could be filtered correctly?

  4. #4
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Without specifics from you, I can provide no exact help.

    Post the subform record source and the subject lookup, including it's underlying table(s).

  5. #5
    rrum is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    5
    Ok, here is the recordsource of the subform:

    SELECT tblRiskExpQual.Risk_Exposure, tblCliQualRA.ClientID, tblRiskExpQual.REQualID, tblCliQualRA.RiskExpQualLev, tblCliQualRA.Narrative, tblRiskExpQual.RiskCatID
    FROM tblCliQualRA INNER JOIN tblRiskExpQual ON tblCliQualRA.REQualID = tblRiskExpQual.REQualID
    ORDER BY tblCliQualRA.QualID;

    And here is the rowsource for the combobox in question - cboREQual (control source REQualID):

    SELECT DISTINCTROW tblRiskExpQual.REQualID, tblRiskExpQual.Risk_Exposure, tblRiskExpQual.RiskCatID
    FROM tblRiskExpQual
    ORDER BY tblRiskExpQual.Risk_Exposure;
    (only one table is included within this query)

    Let me know if you need more information or if I didn't give you all the information you needed. I definitely am no expert with this. Thanks!

  6. #6
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Your subform is creating a new record in table tblRiskExpQual. This can be the result of many events, most probably an improper default value in table tblRiskExpQual. I seldom use default values.

    Veryify that the subform record source in updateable. It probaby is.

    After creation of a new subform record, check table tblRiskExpQual to see what fields are populated. That will identify the culprit.

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

Similar Threads

  1. subform creates duplicate record
    By jheintz57 in forum Forms
    Replies: 0
    Last Post: 03-29-2010, 11:50 AM
  2. Open form which creates new record
    By mjhopler in forum Forms
    Replies: 7
    Last Post: 02-09-2010, 01:37 PM
  3. new record is subform
    By Seven in forum Forms
    Replies: 5
    Last Post: 01-10-2010, 08:24 PM
  4. Lookup values in one column from another record
    By cjayjones in forum Queries
    Replies: 16
    Last Post: 08-05-2009, 02:27 PM
  5. Simple record lookup?
    By Transeau in forum Access
    Replies: 0
    Last Post: 01-18-2006, 10:27 PM

Tags for this Thread

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 - Senior Forums