Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006
    Location
    NC
    Posts
    3

    Unanswered: Invalid SQL Statement check the server filter on the form record source

    Let me start by saying I have built many databases with access, but am fairly new to SQL databases. I am working on a database that I need to share over the internet. I upsized my database to my SQL server, and let the wizard create a project to view it. It works perfect, except one report and one form. Both give the same error: Invalid SQL Statement check the server filter on the form record source I am using access 2003. The report in question uses the following record source: "SELECT Centers.Contact, Calls.CallDate, Calls.CallTime, Calls.Subject, Calls.Notes FROM Calls INNER JOIN Centers ON Calls.CenterID = Centers.CenterID WHERE ((Calls.CallDate >= forms ! DateRange ! [Beginning Call Date] AND Calls.CallDate <= forms ! DateRange ! [Ending Call Date]" The DateRange form simply has 2 fields begining date and ending date.

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    Quote Originally Posted by hces702
    "SELECT Centers.Contact, Calls.CallDate, Calls.CallTime, Calls.Subject, Calls.Notes
    FROM Calls INNER JOIN Centers ON Calls.CenterID = Centers.CenterID
    WHERE ((Calls.CallDate >= forms ! DateRange ! [Beginning Call Date] AND Calls.CallDate <= forms ! DateRange ! [Ending Call Date]" The DateRange form simply has 2 fields begining date and ending date.
    Try

    "SELECT Centers.Contact, Calls.CallDate, Calls.CallTime, Calls.Subject, Calls.Notes
    FROM Calls INNER JOIN Centers ON Calls.CenterID = Centers.CenterID
    WHERE Calls.CallDate >= " & forms ! DateRange ! [Beginning Call Date] & " AND Calls.CallDate <= " & forms ! DateRange ! [Ending Call Date]

  3. #3
    Join Date
    Oct 2006
    Location
    NC
    Posts
    3
    didn't work any more suggestions

  4. #4
    Join Date
    Oct 2006
    Location
    NC
    Posts
    3
    It works great on the original mdb file, but when I try to upsize to my SQL server I lose the 1 form and the 1 report. It may be important to note that the report calls a form with 2 text fields a begining date and ending date. Once entered the user clicks a button labeled preview report in which the select statement above runs and reports within the specified date range. Also the form is a subform called by a button which brings up call records by center(customer) id there is a relationship (one to many) in place allowing multiple calls per center.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •