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

Passing Parameters To Access 1

Status
Not open for further replies.

hitechboy78737

Programmer
Nov 8, 2004
82
US
With SQL Server it is possible to pass in paramaters from the calling routine to a stored procedure.

In access, is it possible to pass in values to a query. If so, how does one do this??

Thanks!
Kevin Howell
 
Provided you don't use a Pass-thru query take a look at Parameters.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Not sure if you are asking how to pass in values from a programatic perspective or a user input??

This will prompt the user with an input box with a caption of "Please enter a condition":

SELECT * FROM tableName WHERE someField = [Please enter a condition]

Does that help or are you trying to pass in a value programatically?



Leslie
 
Man, that was wicked fast...

I'm going to be passing in the value programatically.

Kevin Howell

 
Say you have a form named frmGetParm with a textbox named txtParam, then in the criteria cell for the relevant field in query grid:
=[Forms]![frmGetParm]![txtParam]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I am talking about calling an access query with parameters from a vb.net procedure. Not a vba procedure.

Thanks!
Kevin
 
Take a look at the Parameters collection of the DAO.QueryDef object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top