Converting Access Querry to Paramater Query passing Form Varables?

  • Thread starter Thread starter msNews
  • Start date Start date
M

msNews

I am upsizing a Access 2000 Database to SQL 2000 and I have a problem with
creating a parameter query in SQL.
In Access Code I do the following: Me.RecordSource = "SearchQuery"
where
"SearchQuery" = Select JobNum from Jobs where JobNum =[Forms]![Job
Entry]![Account#]
and I need to change this to a parameter query in SQL Server and pass the
information and I am having
problems.


Thanks
 
You'd need to create a stored procedure or UDF. There's no such thing
as a saved parameter query in SQL Server, and views don't support
parameters. Either that or you can supply the parameter values in
direct SQL as you appear to be trying to do. You can't pass form and
control references to SQL Server, only the values from the controls.

-- Mary
Microsoft Access Developer's Guide to SQL Server
http://www.amazon.com/exec/obidos/ASIN/0672319446
 
Back
Top