Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    jj1 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    128
    Problem persist because I cant change bound column property in Main form for rootcauses to 2 which is text value because I need to have dynamic combo box So, IF i change the value to 2 text values of dynamic combo box countermeasure stops populating.



    Countermeasure gets values as per the selections in root cause




    Quote Originally Posted by June7 View Post
    Now build query that includes Main, RootCause, Countermeasure tables. Use join type "Include all records from Main ..."

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Why are you trying to change the combobox?

    Did you try the query I suggested for the report?

    If you now want to save the text into Main, the comboboxes can still be dependent but requires changing a few things, not just the BoundColumn property.
    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. #18
    jj1 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    128
    Yes I tried the query Here it is

    SELECT tblMainTWTTPSheet.txtRootCause, Count(tblMainTWTTPSheet.txtRootCause) AS CountOftxtRootCause
    FROM HERCARootCauseCMOptionsT RIGHT JOIN tblMainTWTTPSheet ON HERCARootCauseCMOptionsT.intHERCARootCauseID = tblMainTWTTPSheet.atnHERCARootCauseID
    GROUP BY tblMainTWTTPSheet.txtRootCause;


    I changed the combo box property in main table to text box (Look up) no changes in the combo box on main form

    what other properties I have to change to save text in main table instead of ID



    I am attaching a screen shot of properties please see
    Attached Files Attached Files

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    If you want to show the text value in that query then need to pull in the text field from RootCause table, not the field from Main table.

    If you want to save text into Main table:

    Make sure field is text type (might be an issue changing type if Access insists there are established relationships). Then if you have real data need to correct the existing entries in records.

    Combobox properties:

    RowSource: SELECT txtRootCause, atnHERCARootCauseID FROM HERCARootCauseTypesT;
    ControlSource: txtRootCause (field in Main table)
    BoundColumn: 1
    ColumnCount: 2
    ColumnWidths: 1";0"

    Is CounterMeasure combobox dependent on RootCause combobox? What is name of table that associates RootCause and CounterMeasure? The RowSource for CounterMeasure would reference ID from RootCause combobox. Column index begins with 0:

    SELECT txtCounterMeasure FROM tablename WHERE RootCauseID = [RootCause comboboxname].[Column](1);
    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. #20
    jj1 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    128
    Yes Countermeasure combo box is dependent on rootcause combo box. The table that associates RootCause and CounterMeasure is HERCAcountermeasureCMOptionsT


    Quote Originally Posted by June7 View Post
    If you want to show the text value in that query then need to pull in the text field from RootCause table, not the field from Main table.

    If you want to save text into Main table:

    Make sure field is text type (might be an issue changing type if Access insists there are established relationships). Then if you have real data need to correct the existing entries in records.

    Combobox properties:

    RowSource: SELECT txtRootCause, atnHERCARootCauseID FROM HERCARootCauseTypesT;
    ControlSource: txtRootCause (field in Main table)
    BoundColumn: 1
    ColumnCount: 2
    ColumnWidths: 1";0"

    Is CounterMeasure combobox dependent on RootCause combobox? What is name of table that associates RootCause and CounterMeasure? The RowSource for CounterMeasure would reference ID from RootCause combobox. Column index begins with 0:

    SELECT txtCounterMeasure FROM tablename WHERE RootCauseID = [RootCause comboboxname].[Column](1);

  6. #21
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    So did you decide to go with changing the structure to save text instead of ID? Did it work?
    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 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 03-03-2014, 11:07 PM
  2. query that generates percentages
    By jppevy in forum Access
    Replies: 3
    Last Post: 07-30-2013, 10:44 PM
  3. Report Generates Multiple Identical Pages
    By astrolabe262 in forum Reports
    Replies: 1
    Last Post: 02-22-2013, 01:29 PM
  4. Report Generates Duplicate Lines
    By Perceptus in forum Reports
    Replies: 12
    Last Post: 11-20-2012, 05:19 PM
  5. Replies: 9
    Last Post: 01-27-2012, 12:52 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