RE: Parameter from form
- From: PowerPoint Jedi <PowerPointJedi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 1 Apr 2008 11:55:04 -0700
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.
- Follow-Ups:
- RE: Parameter from form
- From: KARL DEWEY
- RE: Parameter from form
- References:
- Parameter from form
- From: PowerPoint Jedi
- RE: Parameter from form
- From: KARL DEWEY
- Parameter from form
- Prev by Date: Re: Query Table1 to only return results based on 'criteria' within a 2nd table
- Next by Date: Re: Reference to next record within a group
- Previous by thread: RE: Parameter from form
- Next by thread: RE: Parameter from form
- Index(es):
Relevant Pages
|