Using Access Forms with SQL stored procs

J

JOE

I was just reading that I can use Access forms to run an
SQL Stored Procedure.
How do I get Access to see my SQL Stored procs?
In the book it shows SP's on the objects list. I do not
have that on mine. Did I not install something properly
or is there a way to link or import SQL SPs?

Thanks,
Joe
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

SPs are shown in the Queries tab of an .adp (Access Database Project).
You have to create this from the File > New > Project (in the side
bar window). This only works in Access versions on & after version
2000.

If you have an .mdb (Microsoft Database file) you can still run an SP
from a form. Just write VBA code to open/execute an SQL pass-thru
query. The pass thru query will have the SP execute statement - like
this:

exec usp_mySP param1, param2, param3

Read the Access Help file on pass-thru queries for more info.


MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQEZOeIechKqOuFEgEQICPgCg94Td7EA69OkimHn8J3ifUYoh6eQAnjSA
Xm8uxcZhRJzU/d+kcezZKc+Z
=IQdh
-----END PGP SIGNATURE-----
 
J

Joe

Yes you are correct I can run a passthru query entering in
the parameters, but I need the parameters to be dynamic
from the form.

My start and end dates are always changing.

Thanks,
Joe
 
J

JOE

THANKS!!!!!!!!!

The .ADP works great. do you know if the data is
refreshed everytime I ope it?

Thanks again!
Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top