Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Store Procedure within Access Project

Status
Not open for further replies.

yakdogs

Programmer
Aug 13, 2002
40
US
I use this code with a view and it works but when I change it to a stored procedure it does not work. I assume that a stored procedure has be handled different. Can anyone help me.

Const stmt = "Select * from vwDeferred_rpt where Client_ID like '[Client_ID]' "

Dim varClient As Variant

varClient = Split(Client, " ")
Me.RecordSource = Replace(stmt, "[Client_ID]", varClient(0))

Your help is greatly appreciated.



 
vak,
You've got to be more specific--what do you mean by Stored Procedure? TSQL on sql2000? PSQL on Oracle? Or Access VBA (which isn't really a 'stored procedure')?

Also, the variable Client in the split. What is that?

What do you mean 'I use this code in a View'? Do you mean a query? If so, by 'this code' do you mean just the statement?

My guess is that the replace() is returning an invalid sql. Try looking at that output in debug window.
--jsteph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top