Rocky Smolin - Beach Access Software
bchacc at san.rr.com
Tue Mar 8 10:37:08 CST 2005
Yeah. Or a value in a text box. Rocky ----- Original Message ----- From: "Susan Harkins" <ssharkins at bellsouth.net> To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Sent: Tuesday, March 08, 2005 8:17 AM Subject: RE: [AccessD] Automating parameterized action queries..... > Rocky -- so you've got a fixed query that's using a function to retrieve > the > selected item in a list or combo box? > > Susan H. > > > Sander: > > I always take parameters from a form. Don't like to let the users muck > around in the database container. So get the parameter into the query I > make a > > Public Function GetParameterX > GetParameterX=Forms!frmWhatever!txtBoxHoldingParameter > End Function > > Then in the query under criteria I put GetParameterX() and it fetches the > contents of the text box from the form when it runs. > > Probably not the most elegant solution but it works and its easy. But you > have to run the query from the form. > > The users I write for prefer it. Almost none of them would know how to > run > a query from the database container and most don't even know what a query > is. > > HTH > > Rocky Smolin > Beach Access Software > http://www.e-z-mrp.com > 858-259-4334 > > ----- Original Message ----- > From: "Sad Der" <accessd666 at yahoo.com> > To: "Access Developers discussion and problem solving" > <accessd at databaseadvisors.com> > Sent: Tuesday, March 08, 2005 6:33 AM > 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 >> > > -- > 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 >