Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your question belongs in a MS Access forum.
-- "Gail" wrote in message ... Hi All, I'm having a problem with DoCmd.OpenReport. I have a report rptIncidents based on a query (qryIncidentRpt) which joins two tables -tblIncident and tblInjury (note all Incidents have a related Injury). The report works fine by itself. I want to set up a form to make choices via combo boxes as to what data is reported ie only incidents on a particular campus, or for a particular Faculty, or between certain dates or all of the above. If I use DoCmd.OpenReport stDocName, acViewPreview I get all the data (as expected) DoCmd.OpenReport stDocName, acViewPreview, , Campus = cboCampus NO data, no error DoCmd.OpenReport stDocName, acViewPreview, , Campus = Me! cboCampus NO data, no error DoCmd.OpenReport stDocName, acViewPreview, qryIncidentRpt, Campus = Me!cboCampus NO data, no error DoCmd.OpenReport stDocName, acViewPreview, qryIncidentRpt, Campus = cboCampus NO data, no error DoCmd.OpenReport stDocName, acViewPreview, qryIncidentRpt, Campus = Me!cboCampus NO data, no error Syntax DoCmd.OpenReport reportname[, view][, filtername][, wherecondition] Also tried with Faculty instead of Campus but same deal I could launch into writing my own Case statements and altering the SQL statement accordingly however, this appeared a much easier shorter option. If only someone can help with what I'm doing wrong. Cheers Gail |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Colon at the end of excel file name(ex: problem.xls:1, problem.xls | New Users to Excel | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
problem with a conditional max problem | Excel Discussion (Misc queries) |