Access dynamic Filter a Textfield with a numberfield





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















my form looks like this:
Form



My problem is, that he "LeistungsBezeichnungsRef" isnt filtering. In my main form, I selected "13222", in addition i want to be shown at the subform just "13222" positions, not 20455, too.



This is my diagram:
enter image description here



The Idea is, that I got a cost centre (13222) to these cost centres it exists some Bills ( excavator, crane etc ) These Bills are cost centre specific! So i build up a table called "LV", where i can type in a position, amount, value etc and in " Leistungserfassung ", I can select a specific position and associate it with a Date/Daily report Number etc , selected in table "Räumstelle".



The field "LeistungsBezeichnungsRef" ( called like "position billing" in engl. ) Has this query:
query of the field wihch has to be filtered
I already wrote the Combobox-Fieldname of the mainform into the query criteria.. but its not filtering










share|improve this question





























    0















    my form looks like this:
    Form



    My problem is, that he "LeistungsBezeichnungsRef" isnt filtering. In my main form, I selected "13222", in addition i want to be shown at the subform just "13222" positions, not 20455, too.



    This is my diagram:
    enter image description here



    The Idea is, that I got a cost centre (13222) to these cost centres it exists some Bills ( excavator, crane etc ) These Bills are cost centre specific! So i build up a table called "LV", where i can type in a position, amount, value etc and in " Leistungserfassung ", I can select a specific position and associate it with a Date/Daily report Number etc , selected in table "Räumstelle".



    The field "LeistungsBezeichnungsRef" ( called like "position billing" in engl. ) Has this query:
    query of the field wihch has to be filtered
    I already wrote the Combobox-Fieldname of the mainform into the query criteria.. but its not filtering










    share|improve this question

























      0












      0








      0








      my form looks like this:
      Form



      My problem is, that he "LeistungsBezeichnungsRef" isnt filtering. In my main form, I selected "13222", in addition i want to be shown at the subform just "13222" positions, not 20455, too.



      This is my diagram:
      enter image description here



      The Idea is, that I got a cost centre (13222) to these cost centres it exists some Bills ( excavator, crane etc ) These Bills are cost centre specific! So i build up a table called "LV", where i can type in a position, amount, value etc and in " Leistungserfassung ", I can select a specific position and associate it with a Date/Daily report Number etc , selected in table "Räumstelle".



      The field "LeistungsBezeichnungsRef" ( called like "position billing" in engl. ) Has this query:
      query of the field wihch has to be filtered
      I already wrote the Combobox-Fieldname of the mainform into the query criteria.. but its not filtering










      share|improve this question














      my form looks like this:
      Form



      My problem is, that he "LeistungsBezeichnungsRef" isnt filtering. In my main form, I selected "13222", in addition i want to be shown at the subform just "13222" positions, not 20455, too.



      This is my diagram:
      enter image description here



      The Idea is, that I got a cost centre (13222) to these cost centres it exists some Bills ( excavator, crane etc ) These Bills are cost centre specific! So i build up a table called "LV", where i can type in a position, amount, value etc and in " Leistungserfassung ", I can select a specific position and associate it with a Date/Daily report Number etc , selected in table "Räumstelle".



      The field "LeistungsBezeichnungsRef" ( called like "position billing" in engl. ) Has this query:
      query of the field wihch has to be filtered
      I already wrote the Combobox-Fieldname of the mainform into the query criteria.. but its not filtering







      ms-access access-vba access






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 16 '18 at 19:15









      FelixFelix

      327




      327
























          1 Answer
          1






          active

          oldest

          votes


















          0














          In the AfterUpdate of the search ComboBox you must requery the subform



          Private Sub SearchComboBox_AfterUpdate()
          TheSubform.Requery

          'Filter the combo in the subform
          TheSubform.Form!TheLVCombo.RowSource = "SELECT whatever FROM LV WHERE ID = " _
          & SearchComboBox.Value
          End Sub





          share|improve this answer


























          • Okay its working more or less. The problem I have is, that the LeistungsBezeichnungs field is a number field, but due to the column choice it shows a text.. If I now say Private Sub Kostenstelle_AfterUpdate() Me.Leistungserfassung.Requery Leistungserfassung.Form!LeistungsBezeichnung.RowSource = " SELECT ID FROM LV WHERE PosKostenstelle = " & KostenstelleRef.Value End Sub It works, but shows the number , not a text.. how do I get it to SELECT the ID, but shows the desciption? @Oliver Jacot-Descomber

            – Felix
            Nov 18 '18 at 11:38













          • SELECT id, text FROM.... Then you must format the ComboBox accordingly: Column Count = 2, Column Widths = "0cm" (makes id column disappear). Bound Column = 1. Limit To List = Yes. List Rows = 16.

            – Olivier Jacot-Descombes
            Nov 18 '18 at 14:52












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53344066%2faccess-dynamic-filter-a-textfield-with-a-numberfield%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          In the AfterUpdate of the search ComboBox you must requery the subform



          Private Sub SearchComboBox_AfterUpdate()
          TheSubform.Requery

          'Filter the combo in the subform
          TheSubform.Form!TheLVCombo.RowSource = "SELECT whatever FROM LV WHERE ID = " _
          & SearchComboBox.Value
          End Sub





          share|improve this answer


























          • Okay its working more or less. The problem I have is, that the LeistungsBezeichnungs field is a number field, but due to the column choice it shows a text.. If I now say Private Sub Kostenstelle_AfterUpdate() Me.Leistungserfassung.Requery Leistungserfassung.Form!LeistungsBezeichnung.RowSource = " SELECT ID FROM LV WHERE PosKostenstelle = " & KostenstelleRef.Value End Sub It works, but shows the number , not a text.. how do I get it to SELECT the ID, but shows the desciption? @Oliver Jacot-Descomber

            – Felix
            Nov 18 '18 at 11:38













          • SELECT id, text FROM.... Then you must format the ComboBox accordingly: Column Count = 2, Column Widths = "0cm" (makes id column disappear). Bound Column = 1. Limit To List = Yes. List Rows = 16.

            – Olivier Jacot-Descombes
            Nov 18 '18 at 14:52
















          0














          In the AfterUpdate of the search ComboBox you must requery the subform



          Private Sub SearchComboBox_AfterUpdate()
          TheSubform.Requery

          'Filter the combo in the subform
          TheSubform.Form!TheLVCombo.RowSource = "SELECT whatever FROM LV WHERE ID = " _
          & SearchComboBox.Value
          End Sub





          share|improve this answer


























          • Okay its working more or less. The problem I have is, that the LeistungsBezeichnungs field is a number field, but due to the column choice it shows a text.. If I now say Private Sub Kostenstelle_AfterUpdate() Me.Leistungserfassung.Requery Leistungserfassung.Form!LeistungsBezeichnung.RowSource = " SELECT ID FROM LV WHERE PosKostenstelle = " & KostenstelleRef.Value End Sub It works, but shows the number , not a text.. how do I get it to SELECT the ID, but shows the desciption? @Oliver Jacot-Descomber

            – Felix
            Nov 18 '18 at 11:38













          • SELECT id, text FROM.... Then you must format the ComboBox accordingly: Column Count = 2, Column Widths = "0cm" (makes id column disappear). Bound Column = 1. Limit To List = Yes. List Rows = 16.

            – Olivier Jacot-Descombes
            Nov 18 '18 at 14:52














          0












          0








          0







          In the AfterUpdate of the search ComboBox you must requery the subform



          Private Sub SearchComboBox_AfterUpdate()
          TheSubform.Requery

          'Filter the combo in the subform
          TheSubform.Form!TheLVCombo.RowSource = "SELECT whatever FROM LV WHERE ID = " _
          & SearchComboBox.Value
          End Sub





          share|improve this answer















          In the AfterUpdate of the search ComboBox you must requery the subform



          Private Sub SearchComboBox_AfterUpdate()
          TheSubform.Requery

          'Filter the combo in the subform
          TheSubform.Form!TheLVCombo.RowSource = "SELECT whatever FROM LV WHERE ID = " _
          & SearchComboBox.Value
          End Sub






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 16 '18 at 19:35

























          answered Nov 16 '18 at 19:27









          Olivier Jacot-DescombesOlivier Jacot-Descombes

          69.8k1091143




          69.8k1091143













          • Okay its working more or less. The problem I have is, that the LeistungsBezeichnungs field is a number field, but due to the column choice it shows a text.. If I now say Private Sub Kostenstelle_AfterUpdate() Me.Leistungserfassung.Requery Leistungserfassung.Form!LeistungsBezeichnung.RowSource = " SELECT ID FROM LV WHERE PosKostenstelle = " & KostenstelleRef.Value End Sub It works, but shows the number , not a text.. how do I get it to SELECT the ID, but shows the desciption? @Oliver Jacot-Descomber

            – Felix
            Nov 18 '18 at 11:38













          • SELECT id, text FROM.... Then you must format the ComboBox accordingly: Column Count = 2, Column Widths = "0cm" (makes id column disappear). Bound Column = 1. Limit To List = Yes. List Rows = 16.

            – Olivier Jacot-Descombes
            Nov 18 '18 at 14:52



















          • Okay its working more or less. The problem I have is, that the LeistungsBezeichnungs field is a number field, but due to the column choice it shows a text.. If I now say Private Sub Kostenstelle_AfterUpdate() Me.Leistungserfassung.Requery Leistungserfassung.Form!LeistungsBezeichnung.RowSource = " SELECT ID FROM LV WHERE PosKostenstelle = " & KostenstelleRef.Value End Sub It works, but shows the number , not a text.. how do I get it to SELECT the ID, but shows the desciption? @Oliver Jacot-Descomber

            – Felix
            Nov 18 '18 at 11:38













          • SELECT id, text FROM.... Then you must format the ComboBox accordingly: Column Count = 2, Column Widths = "0cm" (makes id column disappear). Bound Column = 1. Limit To List = Yes. List Rows = 16.

            – Olivier Jacot-Descombes
            Nov 18 '18 at 14:52

















          Okay its working more or less. The problem I have is, that the LeistungsBezeichnungs field is a number field, but due to the column choice it shows a text.. If I now say Private Sub Kostenstelle_AfterUpdate() Me.Leistungserfassung.Requery Leistungserfassung.Form!LeistungsBezeichnung.RowSource = " SELECT ID FROM LV WHERE PosKostenstelle = " & KostenstelleRef.Value End Sub It works, but shows the number , not a text.. how do I get it to SELECT the ID, but shows the desciption? @Oliver Jacot-Descomber

          – Felix
          Nov 18 '18 at 11:38







          Okay its working more or less. The problem I have is, that the LeistungsBezeichnungs field is a number field, but due to the column choice it shows a text.. If I now say Private Sub Kostenstelle_AfterUpdate() Me.Leistungserfassung.Requery Leistungserfassung.Form!LeistungsBezeichnung.RowSource = " SELECT ID FROM LV WHERE PosKostenstelle = " & KostenstelleRef.Value End Sub It works, but shows the number , not a text.. how do I get it to SELECT the ID, but shows the desciption? @Oliver Jacot-Descomber

          – Felix
          Nov 18 '18 at 11:38















          SELECT id, text FROM.... Then you must format the ComboBox accordingly: Column Count = 2, Column Widths = "0cm" (makes id column disappear). Bound Column = 1. Limit To List = Yes. List Rows = 16.

          – Olivier Jacot-Descombes
          Nov 18 '18 at 14:52





          SELECT id, text FROM.... Then you must format the ComboBox accordingly: Column Count = 2, Column Widths = "0cm" (makes id column disappear). Bound Column = 1. Limit To List = Yes. List Rows = 16.

          – Olivier Jacot-Descombes
          Nov 18 '18 at 14:52




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53344066%2faccess-dynamic-filter-a-textfield-with-a-numberfield%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Florida Star v. B. J. F.

          Error while running script in elastic search , gateway timeout

          Adding quotations to stringified JSON object values