Results 1 to 3 of 3
  1. #1
    Mick99 is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Jul 2015
    Posts
    58

    Report filtering issue

    Hi all, I am having a frustrating problem with a report filter I have been using for years. The filter works fine if the data is a number, but I am using it for text this time and it simply will not filter the report because I am unable to have the text display as per below. I need to be able to put a qutotation mark before and after the text so that the report filter will recognise and apply the filter appropriatley.



    The report filter requires this [RA] = "MT"

    and this is what I currently have [RA] = MT

    This is what the code looks like -

    DoCmd.OpenReport "Rpt AMR", acViewPreview, , "[RA] = " & RScoloumdetail(5)

    I just need a quotation mark before and after RScoloumdetail(5)

    This filter does not work
    Click image for larger version. 

Name:	Filter Does not Work.PNG 
Views:	8 
Size:	1.5 KB 
ID:	21773

    And this filter works
    Click image for larger version. 

Name:	Filter Works.PNG 
Views:	8 
Size:	1.4 KB 
ID:	21774

    Cheers Mick
    Last edited by Mick99; 08-20-2015 at 09:37 PM. Reason: adding pictures

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Parameters for text fields need apostrophe delimiters. Dates use # character.

    Try:

    DoCmd.OpenReport "Rpt AMR", acViewPreview, , "[RA] = '" & RScoloumdetail(5) & "'"

    What is RScoloumdetail(5)?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Mick99 is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Jul 2015
    Posts
    58
    Legend, works a treat. Thank you sooo much. RScoloumdetail(5) is the 6th Col in a query I call that loops through a series of records matching data from another table, the field in a text field that holds initials.

    Cheers Mick

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Issue with searching and filtering query
    By federer8 in forum Queries
    Replies: 1
    Last Post: 02-08-2013, 06:21 PM
  2. Issue with filtering results on a form
    By Aaron5714 in forum Access
    Replies: 5
    Last Post: 05-31-2012, 07:03 AM
  3. Replies: 7
    Last Post: 04-03-2012, 12:29 PM
  4. Report filtering
    By banjo1t in forum Reports
    Replies: 4
    Last Post: 01-26-2011, 06:43 AM
  5. Report Filtering..
    By banjo1t in forum Reports
    Replies: 1
    Last Post: 01-24-2011, 06:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums