error:Invalid SQL Statement check the server filter on the form re

G

Guest

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. 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.
 
P

Pieter Wijnen

I hope you're using a Query
If So add a parameters clause
ie

PARAMETERS Forms!DateRange![Beginning Call Date] DATETIME,
Forms!DateRange![Ending Call Date] DATETIME;
SELECT ...

HTH

Pieter

btw & allways
Never Use spaces and/or reserved words - Hungarian notation still Rules
'BeginningCallDate' as oposed to 'Beginning Call Date'

Joey said:
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. 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top