If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
WhereCondition ignored when MS Access Form invokes Report
I have a form with fields, and a button, whose onclick opens a report, using: DoCmd.OpenReport myReportName, acViewPreview, , myWhereCondition All is well: the report opens, and the parameters from the form appear correctly in the report header. However, the myWhereClause achieves nothing, and fails to cause the appropriate records to be filtered out of the report. Any ideas as to why? The whereCondition is simply "fieldName = 222222". Please note that I ran a query with the exact same whereCondition (SELECT * FROM tableName where fieldName = 222222"), and there, it does work. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
|
|||
|
|||
WhereCondition ignored when MS Access Form invokes Report
"yisraelharris" wrote in message
... I have a form with fields, and a button, whose onclick opens a report, using: DoCmd.OpenReport myReportName, acViewPreview, , myWhereCondition You have one comma missing in the above. DoCmd.OpenReport myReportName, acViewPreview, , , myWhereCondition |
Thread Tools | |
Display Modes | |
|
|