Listbox in subform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jimleon
    New Member
    • Nov 2006
    • 74

    Listbox in subform

    I have a form with a listbox on it that is populated by a query.
    On its own this works fine and lists the querys results, however when I use the same form as a subform it stops working.
    I have checked the form, listbox and query but cannot find the problem.
    What does the mainform do to the subform (apart from turn it into a control) to stop the listbox outputting the results?
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    When you say stops working, do you mean that nothing shows up in the list, or it has erros? Is the list source set in its properties or is it set/requeried in code?

    Comment

    • jimleon
      New Member
      • Nov 2006
      • 74

      #3
      Yes, I meant nothing shows up in the list box. The Row Source is set in the properties thus:
      SELECT listNewJobs.wor kDate, listNewJobs.[Client Ref], listNewJobs.Com pany, listNewJobs.wor kType FROM listNewJobs;
      and the Row Source Type is Table/Query using the query called listNewJobs

      Comment

      • ChipR
        Recognized Expert Top Contributor
        • Jul 2008
        • 1289

        #4
        Well that certainly looks fine. How about the column count and column widths in the Format properties? I don't know why those would change, but I can't think of anything else at the moment.

        Comment

        • jimleon
          New Member
          • Nov 2006
          • 74

          #5
          As a stand alone form it works fine so I know everythings ok there, it is only after it has been put in as a subform it wont work

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            When the form is used as a subform, what view is it in? Most subforms are displayed in Datasheet View. In this view, a Listbox is displayed as a blank textbox. When you move into the textbox a dropdown arrow appears and can be used, ala combobox style, to run thru the selections. This same behavior is repeated when a subform with a Listbox is displayed in Datasheet View.

            Linq ;0)>

            Comment

            • jimleon
              New Member
              • Nov 2006
              • 74

              #7
              Its displayed as a single form...

              Comment

              • missinglinq
                Recognized Expert Specialist
                • Nov 2006
                • 3533

                #8
                Don't have a clue then! Could you zip it up and post it so we could place our hands on it? And it's always a good idea when attaching a file to give the Access version you're using. Actually, it's a good idea anytime you're posting a question!

                Linq ;0)>

                Comment

                Working...