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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report from Listbox

Status
Not open for further replies.

nkrukovsky

Programmer
Nov 4, 2003
5
US
I have a list box that lists the three types of proposals I work on. When a type is selected, you can generate a report of only those types of proposals. The listbox is filled with a query of all proposal types.

I would like to generate a report based on two types of proposals. i.e A report of all Proposal type 1 and type 2 but excluding type 3.

Is there a way to add another report option (type 4 = type 1 + type 2) to the listbox?

Is there also a way to add another option (say a type 5) that would include all the other types (types 1, 2 and 3)?

The above would be ideal, but I could not figure it out. I also tried making separate command buttons for these 'special' reports, but was unable to get the 'where' syntax correct. So I kept getting the wrong report. If my first two questions (adding these special report types to the listbox with the other options) are not possible, can someone offer another solution and/or possibly help with the WHERE syntax so I get the correct results?

I hope I explained myself properly, I am still quite new to VBA. If anyone can help, I would be very thankful.

Nick

 
Here is my non-working code for one of the command buttons, if anyone can tell me what is wrong...

Private Sub cmdPrevFULLandRET_Click()

DoCmd.OpenReport "repProposalActivity", acViewPreview, , "[project_type]= 'Full Proposal' Or 'Retention Exercise'"

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top