By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

how to pass a parameter to SP from a form?

P: n/a
Hi,

I managed to do this by using a query and [Forms]![myForm]![..] syntax,
but it does not work with SPs. So I created a procedure with "@" to
define a paraemter, but how can I pass a value to this procedure from a
form?

Thanks for any suggestions.
Regards,

Maciek Zywno
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You need to use a pass-through query, and dynamically change the SQL
associated with the query to include the value you want passed.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Maciek Zywno" <mi****@gazeta.pl> wrote in message
news:cs**********@inews.gazeta.pl...
Hi,

I managed to do this by using a query and [Forms]![myForm]![..] syntax,
but it does not work with SPs. So I created a procedure with "@" to define
a paraemter, but how can I pass a value to this procedure from a form?

Thanks for any suggestions.
Regards,

Maciek Zywno

Nov 13 '05 #2

P: n/a
Douglas J. Steele wrote:
You need to use a pass-through query, and dynamically change the SQL
associated with the query to include the value you want passed.

Thank you, but I've got two more questions:

- does it work with MS SQL server - I would like to use Access as a frontend
- does it work in Access2003? (I cannot see Pass-Through query in my
Access2003 as it is explained in http://support.microsoft.com/?kbid=303968)
- generally what tool other than Access would you suggest to build a
simple GUI front end to a database (preferably by wizards of course)

Regards,
Maciek Zywno
Nov 13 '05 #3

P: n/a
Yes, it works with SQL Server and with Access 2003. Reread the KB article:
pass-through queries are created exactly the same way in Access 2003 (select
Pass-Through from the SQL Specific submenu under the Query menu). And, in
fact, you don't even need to create a DSN first: you can set the Connect
property of the query to a DSN-less connection string.

I think Access is probably the best tool for this.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Maciek Zywno" <mi****@gazeta.pl> wrote in message
news:cs**********@inews.gazeta.pl...
Douglas J. Steele wrote:
You need to use a pass-through query, and dynamically change the SQL
associated with the query to include the value you want passed.

Thank you, but I've got two more questions:

- does it work with MS SQL server - I would like to use Access as a
frontend
- does it work in Access2003? (I cannot see Pass-Through query in my
Access2003 as it is explained in
http://support.microsoft.com/?kbid=303968)
- generally what tool other than Access would you suggest to build a
simple GUI front end to a database (preferably by wizards of course)

Regards,
Maciek Zywno

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.