Re: Can a SQL Pass Through query use a parameter from a Form Control?
- From: "woody" <woodywoodtucker@xxxxxxxxx>
- Date: 30 Oct 2006 12:46:40 -0800
When I try to run that from withing the SPT query, I get an ODBC
error... "Invalid syntax near the keyword 'as'. So not sure if I'm not
doing something properly.
Thanks again for the assistance!
woody wrote:
Thanks for the tip.. but where do I execute that code from within
Access?
Thanks, again!
Duane Hookom wrote:
You can use a little DAO code like:
Dim strSQL as String
strSQL = "EXEC spYourSP '" & Forms!Form1]![Combo6] & "'"
CurrentDb.QueryDefs("qsptMySPT").SQL = strSQL
--
Duane Hookom
MS Access MVP
"woody" <woodywoodtucker@xxxxxxxxx> wrote in message
news:1162238110.296686.153750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a bit of a newbie question (basically stated in the subject of
the posting). If need to get some data out of a SQL Server Database.
Can I use a control from a form to supply a parameter. I've created a
stored procedure with the parameter I need, I just dont know how to
send the data from the form to the SPT query.
So I need to get data out of [Forms]![Form1]![Combo6] to my SPT query.
Can I do it?
Any help is greatly appreciated.
Thanks!
.
- Follow-Ups:
- Re: Can a SQL Pass Through query use a parameter from a Form Control?
- From: Duane Hookom
- Re: Can a SQL Pass Through query use a parameter from a Form Control?
- References:
- Prev by Date: Re: Previous Week Ending Date
- Next by Date: Re: To Crosstab or not to crosstab
- Previous by thread: Re: Can a SQL Pass Through query use a parameter from a Form Control?
- Next by thread: Re: Can a SQL Pass Through query use a parameter from a Form Control?
- Index(es):
Relevant Pages
|
|