A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

PARAMETERS FOR STORED PROCEDURE (UPDATE, APPEND)



 
 
Thread Tools Display Modes
  #1  
Old November 8th, 2004, 10:05 AM
Zlatko
external usenet poster
 
Posts: n/a
Default PARAMETERS FOR STORED PROCEDURE (UPDATE, APPEND)

I use a stored procedure that is calling several other stored procedure
which update or append values in several tables. All of them are stored
procedures with input parameters by which they filter rows to be updated or
inserted into other tables.
Filtration is based on certain actual values on forms (form with several
subforms).

My question is following: How to pass parameters to those stored procedures
that are triggered by a button?
Those stored procedures are not recordset of forms, so I can't pass it using
Input Parameters property of forms (or I can?).

Thanks.

Zlatko


  #2  
Old November 8th, 2004, 02:33 PM
Wayne Morgan
external usenet poster
 
Posts: n/a
Default

You've stated that the parameter values are available on forms. As long as
those form are open and the values exist on the forms at the time the stored
query is run, you can tell the query to retrieve those values from the
forms. This would normally be in the criteria of the query, but can be in a
calculated field as well. The syntax would be

Forms!frmFormName!ctlControlName

Depending on the data type of the parameter, you may need to predefine the
data type (this is usually needed for the Date/Time data type). To do that,
open the query in design view. On the menu bar click Query|Parameters... For
the name of the parameter, type in (or copy/paste in) the parameter name
exactly as it appears in the query (i.e. Forms!frmFormName!ctlControlName)
and choose a data type for that parameter.

--
Wayne Morgan
MS Access MVP


"Zlatko" wrote in message
...
I use a stored procedure that is calling several other stored procedure
which update or append values in several tables. All of them are stored
procedures with input parameters by which they filter rows to be updated
or
inserted into other tables.
Filtration is based on certain actual values on forms (form with several
subforms).

My question is following: How to pass parameters to those stored
procedures
that are triggered by a button?
Those stored procedures are not recordset of forms, so I can't pass it
using
Input Parameters property of forms (or I can?).



  #3  
Old November 8th, 2004, 06:07 PM
Zlatko
external usenet poster
 
Posts: n/a
Default

Yes, but it works only in .mdb, while my question is regarding .adp (Access
Projects with SQL Server)...You can't reference controls from forms in
criteria directly, but only indirectly defining input parameters (@name of
parameter)...

"Wayne Morgan" wrote in message
...
You've stated that the parameter values are available on forms. As long as
those form are open and the values exist on the forms at the time the

stored
query is run, you can tell the query to retrieve those values from the
forms. This would normally be in the criteria of the query, but can be in

a
calculated field as well. The syntax would be

Forms!frmFormName!ctlControlName

Depending on the data type of the parameter, you may need to predefine the
data type (this is usually needed for the Date/Time data type). To do

that,
open the query in design view. On the menu bar click Query|Parameters...

For
the name of the parameter, type in (or copy/paste in) the parameter name
exactly as it appears in the query (i.e. Forms!frmFormName!ctlControlName)
and choose a data type for that parameter.

--
Wayne Morgan
MS Access MVP


"Zlatko" wrote in message
...
I use a stored procedure that is calling several other stored procedure
which update or append values in several tables. All of them are stored
procedures with input parameters by which they filter rows to be updated
or
inserted into other tables.
Filtration is based on certain actual values on forms (form with several
subforms).

My question is following: How to pass parameters to those stored
procedures
that are triggered by a button?
Those stored procedures are not recordset of forms, so I can't pass it
using
Input Parameters property of forms (or I can?).





  #4  
Old November 9th, 2004, 11:01 AM
Wayne Morgan
external usenet poster
 
Posts: n/a
Default

Sorry, I should have caught that. I'm studying SQL Sever and .adp's now, but
I'm not that far along yet.

--
Wayne Morgan
MS Access MVP


"Zlatko" wrote in message
...
Yes, but it works only in .mdb, while my question is regarding .adp
(Access
Projects with SQL Server)...You can't reference controls from forms in
criteria directly, but only indirectly defining input parameters (@name of
parameter)...



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update another table with a Max record query Ngan Running & Setting Up Queries 2 June 22nd, 2004 05:01 PM
Can't update table from Form sara Using Forms 3 June 11th, 2004 02:12 PM
Need help! Parameter update query to form Le Tran New Users 7 June 8th, 2004 06:26 PM
Why no update? Help! Brian New Users 1 May 6th, 2004 11:15 AM


All times are GMT +1. The time now is 04:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.