Solved

filter report content using vba

Posted on 2007-11-28
3
558 Views
Last Modified: 2010-10-05
i'm trying to open a report filtered to a certain ref:

 Dim stDocName As String

    stDocName = "PAYMENTRECIEPTSBANK"
DoCmd.OpenReport stDocName, acViewPreview, , wherecondition:="TransferRef = " &  Me.TransferRef

the transferref Datatype is Text because it is a mix of details which may be entered

Any Suggestion to why it does not filter the report????

rgds

benyaw
   
0
Comment
Question by:Benyaw
  • 2
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 20366201
try

Dim stDocName As String

    stDocName = "PAYMENTRECIEPTSBANK"
DoCmd.OpenReport stDocName, acViewPreview, ,"[TransferRef] = '" &  Me.TransferRef &"'"
0
 

Author Closing Comment

by:Benyaw
ID: 31411434
Thank you very much
0
 

Author Comment

by:Benyaw
ID: 20366268
worked perfect........thank you
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now