Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 referencing forms value

Author  Topic 

jean
Starting Member

6 Posts

Posted - 2003-04-03 : 16:52:00
hi guys, how do i reference controls objects such as forms or reports in MS Access in SQL Server 2000 query. Like for example in MS Access Query Criteria = like forms!frmUser.txtUserName

thanks a lot,
jean

MichaelP
Jedi Yak

2489 Posts

Posted - 2003-04-03 : 17:02:03
You have to pass the values into the query as a parameter.

Here's an exampel from the Northwind database:

 

CREATE PROCEDURE CustOrdersOrders @CustomerID nchar(5)
AS
SELECT OrderID,
OrderDate,
RequiredDate,
ShippedDate
FROM Orders
WHERE CustomerID = @CustomerID
ORDER BY OrderID



When calling this stored proc, you need to pass the value of @CustomerID into the stored proc.

Are you using Access as a FrontEnd to SQL Server?

Michael


<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

jean
Starting Member

6 Posts

Posted - 2003-04-04 : 08:13:01
yes michael, im using MS Access 2002 as my front end and SQL Server 2000 as my back end. Do i have to place a code on the MS Access Form to pass values on the query? and what should be.

thanks,
jean

Go to Top of Page
   

- Advertisement -