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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whoops! Using controls as parameters for SQL stored procedures

Status
Not open for further replies.

SadOldGoth

Programmer
May 21, 2002
42
GB
Hi Folks,

Ok, I'll word it correctly this time. I've got an SQL-2000 database with stored procedures inside. I want to call thses from an Access 2000 database using pass through queries.

Where there are no parameters, or where the parameters are discreet values, a 'docmd.openquery "Q_Name"' will work. By discreet values I mean where a query looks like the following.

execute Add_Creature "Vampire",1,1,1,1

In the above, everytime the docmd.openquery function is called, "Vampire" is added to the creature table.

What I want to do is to build a query that says

execute Add_Creature [forms]![my_form].Creature_Name, level, etc

and then when the docmd is called the values from my_form are passed.

I think that's explained what I mean...properly, this time.

Thanks,

Jes
 
Hi,

Set a vb variable to the value of the control then use that for the stored procedure parameter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top