RE: Parameter from form



Thanks for the response. Here is the query I have (I guess it is actually a
stored procedure but same premiss)
I want to reference the form to meet the WHERE requirements. It won't let
me put that line of code, and being self taught in access I dont know what
the proper syntax is for calling out the form. The line of code I wrote in
my origional question works on the databases I have made off the SQL server.
Do you need any more information?

Here is the SQL

ALTER PROCEDURE dbo.[QSPC Repair Failures]
(@Start_date datetime)
AS INSERT INTO dbo.[TSPC All Failures]
(Serial, PartNo, TestID, Test_Type)
SELECT dbo.Tests.Serial, dbo.REPAIRS.PartNo, dbo.REPAIRS.TestID,
dbo.Tests.Test_Type
FROM dbo.Tests INNER JOIN
dbo.TEST_TYPES ON dbo.Tests.Test_Type =
dbo.TEST_TYPES.Test_Type INNER JOIN
dbo.REPAIRS ON dbo.Tests.TestID = dbo.REPAIRS.TestID
INNER JOIN
dbo.Failed_Codes INNER JOIN
dbo.Code_Groups ON dbo.Failed_Codes.Code_Group =
dbo.Code_Groups.Code_Group ON
dbo.REPAIRS.Repaired_Code = dbo.Failed_Codes.Fail_ID
WHERE (dbo.Tests.Start_Time <= @Start_Date) AND (dbo.Tests.Test_Type = 1
OR
dbo.Tests.Test_Type = 3) AND (dbo.Tests.Start_Time >=
@start_date)
ORDER BY dbo.Tests.Serial, dbo.REPAIRS.PartNo

"KARL DEWEY" wrote:

How are you using [Forms].[SPC Form].[Start_date] in your query?

Post the SQL of your query.
--
KARL DEWEY
Build a little - Test a little


"PowerPoint Jedi" wrote:

Hello,
First off I am using Microsoft acess 2003 and am running of an SQL Server

I am designing a macro that calls a number of different queries to
accomplish my end goal. Each query requires a date input (which is the same
for all of them). I have created a form to enter the one date so that I
didn't have to be prompted 8 times.

I have done this before when not running on an SQL server and used this
command
[Forms].[SPC Form].[Start_date]

Where SPC Form is the name of my Form and Start date is the name of the text
box with the information in it.
When I try to save this it tells me

"ADO ERROR - The column prefix [Forms].[SPC Form].[Start_Date] does not
match with a table name or alias name used inthe query

How do I call a form using acess on an SQL server? This worked before just
running off my normal network.
.



Relevant Pages

  • Re: slowing/halting stored procedure from ado.net
    ... calling the same stored procedure from SQL> Management ... > Studio goes without any slowdown, ... > There was/is no big job running on the sql server, ... >> Erratic performance of any query is usually due to something changing. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Database Engine Tuning Advisor suggestion to replace syntax.
    ... Actually, what I said was "IF this code is running in a stored procedure", ... execution with the execution plan generated for the first execution. ... SQL Server does not have to compile the second statement." ... replace query 1 below with the syntax in query 2 below. ...
    (microsoft.public.sqlserver.tools)
  • Re: "EXEC" in SQL Server 2000 Views
    ... Kalen Delaney ... > INNER JOIN b ... > Could not execute query against OLE DB provider 'MSDASQL'. ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Strange bug, hard to reproduce - is it known?
    ... tables used in the query, nor the query itself were changed (I did make ... particular stored procedure), yet it did work correctly before. ... tables involved in my test database, using the EXACT same columns, ... INNER JOIN dbo.GR AS r ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL Server - Filter
    ... Happy to use a stored procedure but prefer to use a View that can be linked ... >> the sql server tables from access you are pretty much defeating the idea ... > many fewer bugs if they'd just used Access queries for the most part. ... > to query data from the back-end. ...
    (comp.databases.ms-access)