• Passing data from fields (access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Passing data from fields (access 2000)

    Author
    Topic
    #388536

    Hello, how do I click on an entry in a drop down list combo then have that entry populate another text box on a form. I need to repeat this process a number of times so each click adds a further entry to the text box.

    Many thanks

    Viewing 0 reply threads
    Author
    Replies
    • #682613

      Before I give you the wrong answer, could you clarify a couple of things?

      1. Are the combo box and text box on the same form?
      2. When you say “each click adds a further entry to the text box”…do you mean that it will overwrite the last entry into the text box?
        or are you creating a list of data inside the text box?
      • #682620

        Thanks Trudi, yes the combo and text are on the same form and each click adds further data to the text box, not an overide of previoud data.

        Cheers Darren

        • #682641

          Thanks Darren… smile

          All you have to do is add an expression to the AfterUpdate event procedure for the combobox…
          Something like this:

          If txtYourName “” Then
          txtYourName = txtYourName & “, ” & cboYourName
          Else
          txtYourName = cboYourName
          EndIf

          I don’t know what format you’re needing the output in, but I’ve attached a quick example I made…
          It just has one table and one form… but hopefully it’ll help give you ideas and help get you started…

          Let me know if something doesn’t make sense…

          HTH

          • #682657

            Trudi, you are wonderful.

            Thanks

            • #683152

              Not taking anything away from Trudi’s solution, you could try replacing:

              If txtYourName “” Then
              txtYourName = txtYourName & “, ” & cboYourName
              Else
              txtYourName = cboYourName
              EndIf

              by the following statement:

              txtColorList = (txtColorList + “, “) & cboColorDescription

              Notice the + is used instead of the &.
              What happens is that the expression (txtColorList + “, “) evaluates to Null the first time it’s used.

    Viewing 0 reply threads
    Reply To: Passing data from fields (access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: