Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

filter report content using vba

Posted on 2007-11-28
3
Medium Priority
?
588 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

636 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