Idealy I would want to build a re****t that would allow me to pass the
"datesubmitted" to the query for it. But it have no idea where to paste
this
code or how to structure the dynamic query.
Would you mind explaining where to put the code and how my query that the
form references should look like?
"Albert D. Kallal" wrote:
> > For example when I click the button at the end of the row, it runs
<sudo
> > code> SELECT * FROM TableName WHERE date = "currentrow.datesubmited"
> > </sudo
> > code>
> >
>
> No problem, but what do you want with the results of that query? Do you
want
> to open a new form, open a new re****t?...You have to "do" something with
> that query. When you run a query in code, you can only send the results
to a
> internal reocrdset for further processing. If you need the "user" to see
the
> results of that query for the most part you open up a re****t, or form
based
> on that table and "pass" the criteria.
>
> for example when you click the button to launch a re****t that opens with
the
> records on the datesumiited, you could go:
>
>
> dim strWhere as string
>
> strWhere = "DateSubmited = #" & format(me!DatesSubmitted,"mm/dd/yyyy") &
"#"
>
> docmd.Openform "frmViewDate",,,strWhere
>
> Note that it *is* possible to build the select query, but you options to
> display it are limited, and using a form, or re****t with a filter as
above
> will do the trick.
>
> You might expand a bit as to what you want to do with that select query,
but
> as above shows, it FAR easier to pass a "where" clause to a re****t or
form
> that can display the data, and as above shows it not a lot of code
either...
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKallal@[EMAIL PROTECTED]
>
>
>


|