[AccessD] Automating parameterized action queries.....

Jim DeMarco Jdemarco at hudsonhealthplan.org
Tue Mar 8 08:51:44 CST 2005


Sander,

I'm not 100% positive but I believe I've seen a technique that did allow you to programatically fill "Enter xxx" prompts.  Have you searched the web?  I'm sorry I don't have anything more concrete to offer other than a vague recollection.

A quick search of Dev Ashish's site turns up this code:

Dim db As Database 'current database
Dim rs As Recordset 'holds query resultset
Dim qdfParmQry As QueryDef 'the actual query object
    Set db = CurrentDb()
    Set qdfParmQry = db.QueryDefs("Qry1")
    qdfParmQry("Please Enter Code:") = 3
    qdef.parameters(1) = "[Enter xxx]= " & yourvaluehere

Maybe that will help you figure out how to handle that situation.  

HTH 

Jim DeMarco

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Sad Der
Sent: Tuesday, March 08, 2005 9:34 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Automating parameterized action queries.....


I also thought of that but I hoped their was a way to
fill the parameters per query with form input.

That way i could make a form for the users in wich
they can enter:
- a new report
- queries per report
- parameters per query
- parametertype per parameter (eg date, number, etc)

With this info I could, based on a report selection
build a form dynamicly.

Well I have to look at this some more and let the
customer decide.

Regards,

Sander

--- Bobby Heid <bheid at appdevgrp.com> wrote:
> Why not have two sets of queries, one set that looks
> to a form (this one is
> called programmatically), and one set that queries
> the user for the
> parameters?
> 
> Bobby
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On
> Behalf Of Sad Der
> Sent: Tuesday, March 08, 2005 8:10 AM
> To: Access Developers discussion and problem solving
> Subject: RE: [AccessD] Automating parameterized
> action queries.....
> 
> 
> You are correct. However the queries are not
> executed
> via from several forms but they are executed:
> 1- via one form
> 2- a user manually clicks it in the database
> container.
> 
> The process is as follows:
> 1 - the reports (xls files) are stored in the
> database
> 2 - the queries that create the report are also
> stored
> in the database
> 3 - the user selects a report
> 4 - the necessary queries are executed one by one
> 
> However, several times a week a manager requests a
> part of the report that is slightly different from
> the original. A user then
> must have the change to quickly adjust the query and
> run it manually.
> 
> HTH
> 
> Sander
> 
> 
> --- Bobby Heid <bheid at appdevgrp.com> wrote:
> > If you are not wanting to encode a particular form
> > field because the query
> > is called from several forms, might I suggest that
> > you create a new hidden
> > form that contains fields for all of the fields
> that
> > are used as parameters.
> > Then the queries can access these fields.
> > 
> > You would need to set the fields on the form
> before
> > the queries were
> > executed.
> > 
> > Bobby
> > 
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com
> > [mailto:accessd-bounces at databaseadvisors.com] On
> > Behalf Of Sad Der
> > Sent: Tuesday, March 08, 2005 3:15 AM
> > To: Acces User Group
> > Subject: [AccessD] Automating parameterized action
> queries.....
> > 
> > 
> > Hi group,
> > 
> > my story of the queries continues. I need to run a
> > set
> > of action queries. This works fine.
> > 
> > Several queries have parameters. So that means the
> > user has to watch the screen for a parameter to
> > pop-up. Is it possible to add some parameter
> fields
> > in
> > the form to fill the required parameters...WITHOUT
> > changing the query it self?
> > 
> > So I have a parameters in my query:
> > [Enter version:]
> > [Enter startdate:]
> > 
> > And I do not want to change these to:
> forms!frmReport!txtVersion
> > forms!frmReport!txtStartDate
> > 
> > TIA
> > 
> > Sander
> > 
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> >
> http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> > 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


 



***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited.  If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message.  Thank You".
***********************************************************************************




More information about the AccessD mailing list