Creating a report based on an update query

K

Kate

I have a database that tracks cost information for our products. Currently, I
have an update query that allows the user to change the price information.
Additionally, I have a macro that emails the results of the query. I would
like to be able to put the results of the update query into a report. I have
created a form that allows the user to select the P.O. number that they would
like to update it's price information (in the query, the criteria is
forms![myform]![PO]). I tried to create a form using the update query as its
control source; however, the update queries that I have in the database are
not listed under the table/query drop down list.

Is it possible to create a report based on an update query? if so,
suggestions on how to start?

Thanks!

FYI - I posted this same question under the Report Discussion Group...wasn't
sure which one it would be most applicable under. thanks!
 
O

Ofer Cohen

You can't base your form/report on action queris (append , update, create,
delete) you can base them on select queries only that return records.

How ever , base the report/form on the table that you just updated, it
should show the desire resault after the action query.
So, run the action query and then open the report

Docmd.OpenQuery "QueryName"
Docmd.OpenReport "ReportName"

You can send the report a criteria with the desire P.O number
Docmd.OpenReport "ReportName" , , , "[PO fieldNAmeInTable] = " & Me.[PO
fieldNameInForm]

And if the PO field type is text use
Docmd.OpenReport "ReportName" , , , "[PO fieldNAmeInTable] = '" & Me.[PO
FieldNameInForm] & "'"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top