By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,480 Members | 2,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,480 IT Pros & Developers. It's quick & easy.

Listbox in subform

jimleon
P: 74
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?
Jan 29 '09 #1
Share this Question
Share on Google+
7 Replies


Expert 100+
P: 1,287
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?
Jan 29 '09 #2

jimleon
P: 74
Yes, I meant nothing shows up in the list box. The Row Source is set in the properties thus:
SELECT listNewJobs.workDate, listNewJobs.[Client Ref], listNewJobs.Company, listNewJobs.workType FROM listNewJobs;
and the Row Source Type is Table/Query using the query called listNewJobs
Jan 29 '09 #3

Expert 100+
P: 1,287
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.
Jan 29 '09 #4

jimleon
P: 74
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
Jan 29 '09 #5

missinglinq
Expert 2.5K+
P: 3,532
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)>
Jan 29 '09 #6

jimleon
P: 74
Its displayed as a single form...
Jan 29 '09 #7

missinglinq
Expert 2.5K+
P: 3,532
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)>
Jan 29 '09 #8

Post your reply

Sign in to post your reply or Sign up for a free account.