A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

WhereCondition ignored when MS Access Form invokes Report



 
 
Thread Tools Display Modes
  #1  
Old May 31st, 2004, 08:14 PM
yisraelharris
external usenet poster
 
Posts: n/a
Default 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  
Old June 1st, 2004, 01:24 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.