Parameter from form

  • Thread starter PowerPoint Jedi
  • Start date
P

PowerPoint Jedi

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

KARL DEWEY

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

Post the SQL of your query.
 
P

PowerPoint Jedi

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

KARL DEWEY

I can not help with this code.
--
KARL DEWEY
Build a little - Test a little


PowerPoint Jedi said:
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 said:
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 said:
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.
 
P

PowerPoint Jedi

Am I posting in the right section? Do i Need to go somewhere else? Thanks
though for the attempt.

KARL DEWEY said:
I can not help with this code.
--
KARL DEWEY
Build a little - Test a little


PowerPoint Jedi said:
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 said:
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


:

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

KARL DEWEY

It is just that I do not know code. I suggest you start a new post.
--
KARL DEWEY
Build a little - Test a little


PowerPoint Jedi said:
Am I posting in the right section? Do i Need to go somewhere else? Thanks
though for the attempt.

KARL DEWEY said:
I can not help with this code.
--
KARL DEWEY
Build a little - Test a little


PowerPoint Jedi said:
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

:

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


:

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.
 

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