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

Yet another list box problem

P: n/a
Hi, back again with another list box problem, 3rd in two days!

I am wanting to create a list box that lists all the results of a
query. I am using Access 2000, and I'm sure this is easier to do in
Access 2003, but seeing as I don't have it I'll have to make do! using
the list box wizard I try to base the list box on the query i am using
(qryAvailable_Cars). However i always receive an error message saying
"No value given for one or more required parameters".

Therefore, i decided to use the following code as the Row source for
the list box:

SELECT [qryAvailable_Cars].[Car ID], [qryAvailable_Cars].[Reg Number],
[qryAvailable_Cars].[Type], [qryAvailable_Cars].[Fuel Type],
[qryAvailable_Cars].[Gearbox] FROM qryAvailable_Cars;

(The query qryAvailable_cars contains the fields Car ID, Reg Number,
Type, Fuel Type, Gearbox)

However, when i do this, the list box only returns the first field of
all the records, Car ID. this is pretty pointless! There is probably a
mistake with the above coding. would be grateful for any pointers.
thanks
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Your query is fine, you need to look at the properites of the listbox
in design view (on your form?).

Double click on the listbox, on the box that pops up - look at the
format tab. Then change the column count to more than one. Of course
this will in the end only display the Card ID, but on clicking the box
- when it drops down you'll see the other values (also you may have to
change the width of the listbox).

Dave

Nov 13 '05 #2

P: n/a
On 23 Dec 2004 12:19:39 -0800, ormy28 wrote:
Hi, back again with another list box problem, 3rd in two days!

I am wanting to create a list box that lists all the results of a
query. I am using Access 2000, and I'm sure this is easier to do in
Access 2003, but seeing as I don't have it I'll have to make do! using
the list box wizard I try to base the list box on the query i am using
(qryAvailable_Cars). However i always receive an error message saying
"No value given for one or more required parameters".

Therefore, i decided to use the following code as the Row source for
the list box:

SELECT [qryAvailable_Cars].[Car ID], [qryAvailable_Cars].[Reg Number],
[qryAvailable_Cars].[Type], [qryAvailable_Cars].[Fuel Type],
[qryAvailable_Cars].[Gearbox] FROM qryAvailable_Cars;

(The query qryAvailable_cars contains the fields Car ID, Reg Number,
Type, Fuel Type, Gearbox)

However, when i do this, the list box only returns the first field of
all the records, Car ID. this is pretty pointless! There is probably a
mistake with the above coding. would be grateful for any pointers.
thanks


You need to set the column count to 5.
Set the Bound Column to 1.
Then also set the column widths property to:
0",1";1";1":1"
This will hide the bound ID column and display all the others in a
1-inch column.
You can increase or decrease the column widths as needed.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.