input parameter on rowsource of combo/list?

J

Joe Clarke

I understand how to implement input parameters in the recordsource of a form
or report, but what about the rowsource of a combo box or a listbox? What's
the best way to filter the values based on values in other controls on the
form?

TIA,

Joe
 
B

Billy Yao [MSFT]

Hi Joe,

Thanks for posting in the community!

From your description, I understand that you'd like to input parameters in the rowsource of a
combo box or a listbox. Additionally, you prefer the bast way to filter the values on another
controls' basis on the same form.

Have I understood the issue correctly and completely? If there is anything I misunderstood,
please feel free to let me know.

Based on my experience, In an Access Project (.adp) you can try to use a parameterized
stored procedure as the rowsource for a combo box. Set the rowsource property for your
combo box as below (without the prefixing @)

SP_rowsource Parameter (If fails, just use the name of the stored procedure -
SP_rowsource)

Make the other control of the same name than the parameter, and requery the combo box
with the rowsource bound to the stored procedure.

If the stored procedure does not make sense on your scenario, another way you can
implement is to dynamically change the parameter via a selection from another combo box.
I'm not 100% sure this is the best way but I believe you will have a good try. :

For further information, please see the following articles:

287478 ACC2002: Combo Box Value Is Blank After You Set Recordset Property
http://support.microsoft.com/?id=287478

287449 ACC2002: InputParameter Property Cannot Perform Lookup to Visual Basic
http://support.microsoft.com/?id=287449


Joe, does this answer your question? Please feel free to post in the group if this solves your
problem or if you would like further help. We are here happy to be of assistance!

Best regards,

Billy Yao
Microsoft Online Support
 

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