Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question of combo box and reports

Status
Not open for further replies.

JFirst

Programmer
Jul 14, 2003
3
US
I am using one table that contains all the information needing. So I dont believe there should be a query. What I am trying to accomplish is let say I have 20 fields for the same information but all I want to see is three. I created a combo list that will allow me to select severel, but how do I get it to print out only those three and not all of them.
 
Are you saying you'd like to pick and choose from a list what to print a report for? For example, you may have 5 items within the list, but you only need to generate a report for 2 of the five? and you'd like to predetermine by selection which 2?

If this is what you need, use a list box to pull your list criteria. Set the Multi Select Property of the list box to either Simple or Extended depending on whether you want to require the user to hold down Shift to perfom the multi select or simply click on each item.

Next, within your code/procedure you will need a For Each....Next loop to run through each item you have selected within the list box.

It will look something like this this...

'First, declare a variable of type variant.
Dim var as Variant

'Begin loop.
For each var in Me.listboxname.ItemsSelected

'Enter your criteria here.

'Make it loop to next item selected.
Next var

I hope this helps...if I'm totally off base for what you need please forgive me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top