Queries not Upsized - form ref. in criteria

J

Joe

Hello all:
After upsizing an Access dB I (expectedly) encountered
several problems. The main problem being that none of my
queries upsized. I realize that I can re-write these
queries as views, but I'm running into trouble with
criteria. In most of my queries I reference forms in the
where statements using code such as:

WHERE (((tblConditions.strTestPlan)=[forms]!
[frmProductSpecific1]![cmbTestPlan]) AND
((tblConditions.strPlan)=[forms]![frmMainMenuList]!
[lstProduct])

Should I filter the forms? Can this be done in SQL server
views? Do I need to use stored procedures? If yes how?

Any help is greatly appreciated.

Thanks,
Joe
 
N

Norman Yuan

Usually you have rewrite all your queries in Access in SQL Server as stored
procedures (or views). In your example, you are going to use Parameter in
stored procedures, like this:

Create Procedure "MySP"
(
@Para1 varchar(50),
@Para2 varchar(50)
)
AS
SELECT...
FROM...
WHERE tblConditions.strTestPlan=@Para1 AND tblConditions.strPlan=@Para2

You then supply the parameters when you execute the SP.
 

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