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.


|