augurmaster
08-24-2004, 01:05 AM
hi,
i had searched the topic but none can resolve my problem.....ok i want a make a combo box (i will type myself) that can open a certain report when user select it....Example....i have cboYear that represent a year (2003, 2004,...etc)....then when user select 2003, it will open '2003Report'......and so on.....how can i make this....????
i don`t know about vb or script....
thanks....
Hayley Baxter
08-24-2004, 02:58 AM
I am assuming you want to open the same report based on different criteria rather than a selection of reports available in the dropdown, where you select 2003 you will pull up all the figures for 2003 etc.
All you need to do is create a query and under criteria put forms [forms]![yourformname]![yourcomboname] so that it looks to the combo box for a value.
In the afterupdate event of the combo box : DoCmd.OpenReport "YourReportName", acPreview
Example attached should you need it.
augurmaster
08-25-2004, 05:22 PM
thanks....i will make your file for my reference .....
otherwise.....can you please look my file HERE...... (http://s2.yousendit.com/d.aspx?id=EF8D0D984BC5F6B7822B86A058A9E341)
thanks....
Hayley Baxter
08-26-2004, 01:07 AM
I can't open your file as it has been created in a later version of access. I only have 2000 here at work.
augurmaster
08-26-2004, 06:25 PM
:) i`m so sorry for that......nevermind.....
ok i`ve tried and look your file but i got a confused.......my database simply like this.....
i have a main form = frmDomestic
i have a subform in frmDomestic = frmSubDomestic (in datasheet view)
field name in frmSubDomestic are = AutoID,Station,Year (Data Type = Text),ReportNo,......
for example = BKI Station have 4 Data :
Station....Year....ReportNo
--------------------------
BKI...........2003.....01/2003
...............2003.....02/2003
...............2004.....01/2004
...............2004.....02/2004
so...when user click 2003 (to check a report no) in combo box (i type it myself) .......a report that show all report no in 2003 ...... display........
i hope this can clear you......
thanks........