Can anyone help me how to create drop list or a combo box to appear a particular report. Thanks
Can anyone help me how to create drop list or a combo box to appear a particular report. Thanks
Reports dont use combo boxes. They are useless there.
they only work in forms.
OK, let me explain furthermore.
I have a lot of reports like monthly and overall or yearly report. What I am doing right now for my users access which report needed to print or present for submittal I made a form. In that form I created multiple command button corresponds on each reports, so the user just click what they wants like if they wanted to print January expenses they only have to click that January button then the report pops-up.
I am thinking there might be a way instead of creating too much command bottom and making my home or menu view page crowded, I can make a droplist instead.
As ranman advised, combo box is not used with report.
See this material from Martin Green re forms and Dynamic Reports.
Martin has several tips/tutorials that are often referenced.
Good luck.
Ah, if you mean the user picks an item from a combo box on a form, then it opens a report,
then yes, that is a good way.
put 2 more text boxes on the form, txtStartDate and txtEndDate.
another for year.
Then the user picks the month from the cbo, and the year. This fills in the start and end dates.
Be sure to set the text box dates in the AfterUpdate events.
The query in the report is now,Code:sub cboMonth_afterupdate() TxtStartDate= cboMonth & "/1/" & txtYR TxtEndDate = dateAdd("d",-1,DateAdd("m",1,txtStartDate)) end sub
select * from table where [dare] between forms!frmRpt!txtStartDate and forms!frmRpt!txtEndDate