Opening a form using combo & multiselect list box data

  • Thread starter Slez via AccessMonster.com
  • Start date
S

Slez via AccessMonster.com

How can I open a form based on selections in a combobox and a multiselect
list box?

I have a combobox named cboProjectMatl that exists on frmMainScreen. When a
value (project) is selected, a subfom called frmEstimateSelectorBOMBid, which
contains a multiselect list box called lstBidSelectBOM, displays available
bids for that project.

I want users to be able to select desired bids within that box, and then open
a form called frmBOMBid and have data displayed only for the selected bids.
The form frmBOMBid has a mainform and subform. The mainform displays the
project selected in cboProjectMatl, and the subform displays the detail based
on a query called qryBOMBid.

I hope this makes sense. Any help is appreciated!
 
M

Mark Andrews

Use code similar to this (just the concept of taking the selected items and
making a Where Clause with IN (values):
http://www.allenbrowne.com/ser-50.html
to change the query qryBOMBid so that the query
has an appropriate WHERE clause to restrict it to only the selected bids.

You might be able to open the form with a filter or just have the query
refer to a textbox with the IN values as well (sometime I jump to changing
querydefs too quickly).

Then when the frmBOMBid and it's subform open (the form restricts to just
the project selected) I assume you have that working? and the subform
restricts to the bids selected because the query has been changed to only
show those bids (everytime the button is clicked to open the form).

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
 

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