Results 1 to 4 of 4
  1. #1
    Monterey_Manzer is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    164

    Getting to SQL in report record source

    Hello Everyone,

    I am hoping this doesn't require dismantling the report I've generated. Here is my situation. I have a report for which I wrote a subroutine that filters the record source. To avoid having to retype the SQL statement selecting the fields I had built into the initial report, I simply copied and pasted the SQL statement that was the original record source (minus the WHERE clause that my code adds to filter the records). However, I apparently hit an extra key that changed the statement. Now, whenever I am in Design View and I try to edit the record source I get the following error message:

    "Missing ), ], or Item in query expression 'GandHtracker.[SMART ID] = PartInfo.[SMART I'."

    Now I can clearly see what it is that needs to change and I know exactly what it should say. The problem is that after I click "Okay" I do not get the query in either the QBE or SQL format. The above issue doesn't seem to be causing any problems at present since my filtering code replaces the record source SQL statement with one that is correct, but I'd like to clean it up just the same. Anyone know a sneaky way to get at the SQL code?

    Thanks!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    In design view, what do you have in the RecordSource property of the Report?

  3. #3
    Monterey_Manzer is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    164
    Wow, that was an easy fix. I went in through the RecordSource property (didn't even think to look there) and it took me straight to the query. Oddly enough the problem it gave me was not there and when I navigated out I no longer had the previous difficulty in getting to the record source through the Field List (my previous method). Thanks!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

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

Similar Threads

  1. Replies: 14
    Last Post: 05-25-2012, 02:40 AM
  2. How to modify sub report record source
    By EddieN1 in forum Reports
    Replies: 4
    Last Post: 12-12-2011, 06:57 AM
  3. Form Record Source - Best practices.
    By ser01 in forum Forms
    Replies: 1
    Last Post: 06-11-2011, 11:32 AM
  4. Forms' Record Source
    By Progress2007 in forum Programming
    Replies: 11
    Last Post: 07-27-2009, 11:04 AM
  5. Changing the record source in a form
    By lmichaud in forum Forms
    Replies: 1
    Last Post: 07-09-2006, 09:20 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