parameters / stored procedures

qwertyjjj

Registered User.
Local time
Yesterday, 18:44
Joined
Aug 8, 2006
Messages
262
I come from a SQL Server background and am very familiar with store dprocedures and input parameteres.

Is there a way to use a similar method in Access. or example, passing parameters from a button on a form to a query, which can change depending on the input parameter? If so, how ?

Also, how much scope do you have in this for running SQL IF statements and such in the query? It seems that many Access queris can only have one statement at a time.
 
Thanks.
So, you pretty much have to do it with VBA code? There's no way to pass parameters to queries in Access as you would with stored procdures in SQL server?
 
Last edited:
I would tend to think of vba code as a sort of tsql. So you could save a sql statement in a function and pass the param there and insert it into a sql statemnet you build on the fly in the function... Make sense? I'm not aware of a way of calling a stored query by name and passing it a param...
 
Are you looking for something like:

WHERE FieldName = Forms!FormName.ControlName

where each time the query is run it will look to that form control for the criteria?
 
I guess then there you have it.
 

Users who are viewing this thread

Back
Top Bottom