Solved

filter report content using vba

Posted on 2007-11-28
3
537 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 119

Accepted Solution

by:
Rey Obrero 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
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…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

762 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

22 Experts available now in Live!

Get 1:1 Help Now