Talk About Network

Google





Software > Access Forms > Re: Dynamic Que...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 7 Topic 44666 of 46786
Post > Topic >>

Re: Dynamic Query Based on Current Row

by Piet Linden <PieterLinden@[EMAIL PROTECTED] > Aug 9, 2008 at 08:49 PM

On Aug 9, 7:55=A0pm, Bonz099 <Bonz...@[EMAIL PROTECTED]
> wrote:
> Ok so let me see if I have this right, for the on click for the button I
=
use
> this:
>
> dim strWhere =A0 =A0 =A0 as string
> strWhere =3D "DateSubmited =3D #" &
format(me!DatesSubmitted,"mm/dd/yyyy"=
) & "#"
> docmd.Openform "MyRe****t",acViewPreview,,,strwhere
>
> So that particular code opens a form called "MyRe****t" and that form is
> linked to query. And my Query should looks like "SELCT * FROM Table
WHERE
> DateSubmitted =3D strwhere"
>
> Is that right? Or do i not even need to create a query? Im sorry im
reall=
y
> new to writing applications in Access. I really appreciate the help you=
=92ve
> given me thus far.
>

No.  That's not right.  The SQL for your re****t is just
"SELECT * FROM Table;"

then you pass the filter as a separate argument.  That way, you can
pass any filter you want to at runtime/when you open the form/re****t.
 




 7 Posts in Topic:
Dynamic Query Based on Current Row
=?Utf-8?B?Qm9uejA5OQ==?=   2008-08-07 21:11:01 
Re: Dynamic Query Based on Current Row
"Albert D. Kallal&qu  2008-08-07 22:48:26 
Re: Dynamic Query Based on Current Row
=?Utf-8?B?Qm9uejA5OQ==?=   2008-08-08 09:05:01 
Re: Dynamic Query Based on Current Row
"Albert D. Kallal&qu  2008-08-08 18:11:37 
Re: Dynamic Query Based on Current Row
=?Utf-8?B?Qm9uejA5OQ==?=   2008-08-09 17:55:01 
Re: Dynamic Query Based on Current Row
"Albert D. Kallal&qu  2008-08-11 01:32:38 
Re: Dynamic Query Based on Current Row
Piet Linden <PieterLin  2008-08-09 20:49:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Fri Jan 9 16:10:49 PST 2009.