Queries not Upsized - form ref. in criteria

  • Thread starter Thread starter Joe
  • Start date Start date
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
 
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.
 
Back
Top