Form not passing parameter to query

C

callie_sunrise

Hi All,

Right, I have form with an unbound drop down list using a column in a table
for a row source.
I also have a query returning results from the same table.

I have setup the query to use critieria [Forms]![frmname]![dropdownlistname]
on the column concerned to look at the above form and the drop down list for
the paramter.

I have even double checked that I'm doing it correctly here
http://office.microsoft.com/en-us/access/HA011170771033.aspx.

However, for some reason the form just doesnt pass through the parameter
from the drop down list into the query. The query runs but doesnt return any
data.

Any ideas anyone?

I'd be happy to send you anything you needed :)

Much appreciated all!!!
 
D

Douglas J. Steele

By "drop down list", I assume you mean a combo box.

Are you sure that the combo box is returning what you think it is? When you
refer to a combo box, you get the value of the bound column of the selected
row. Try going to the Immediate Windows (Ctrl-G), typing

?[Forms]![frmname]![dropdownlistname]

and hitting Enter. Does it return what you're expecting?

On the other hand, if by "drop down list", you're actually talking about a
list box, you can only refer to list boxes in that way if the MultiSelect
property is set to None.
 
C

callie_sunrise

Hi Douglas,

Sorry, yes I mean Combo Box.

I do seem to have fixed it now with a little tinkering.

I changed the column count and column widths and hey presto it works.

Thank you for you time



Douglas J. Steele said:
By "drop down list", I assume you mean a combo box.

Are you sure that the combo box is returning what you think it is? When you
refer to a combo box, you get the value of the bound column of the selected
row. Try going to the Immediate Windows (Ctrl-G), typing

?[Forms]![frmname]![dropdownlistname]

and hitting Enter. Does it return what you're expecting?

On the other hand, if by "drop down list", you're actually talking about a
list box, you can only refer to list boxes in that way if the MultiSelect
property is set to None.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


callie_sunrise said:
Hi All,

Right, I have form with an unbound drop down list using a column in a
table
for a row source.
I also have a query returning results from the same table.

I have setup the query to use critieria
[Forms]![frmname]![dropdownlistname]
on the column concerned to look at the above form and the drop down list
for
the paramter.

I have even double checked that I'm doing it correctly here
http://office.microsoft.com/en-us/access/HA011170771033.aspx.

However, for some reason the form just doesnt pass through the parameter
from the drop down list into the query. The query runs but doesnt return
any
data.

Any ideas anyone?

I'd be happy to send you anything you needed :)

Much appreciated all!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top