Populate 2nd table from form

L

Linda

I have a table of tasks and issues that are reviewed bi-weekly. I have
created a form that is populated with a subset from that table and only
items of a high and medium status. The user will make modifications to some
of the fields in the subset. Now I need to display a report of the modified
subset. Would I do that by populating another table or can I do it directly
from the form contents? How do I do either technique?
Thanks for your help.
 
M

Marshall Barton

Linda said:
I have a table of tasks and issues that are reviewed bi-weekly. I have
created a form that is populated with a subset from that table and only
items of a high and medium status. The user will make modifications to some
of the fields in the subset. Now I need to display a report of the modified
subset. Would I do that by populating another table or can I do it directly
from the form contents?


Neither. You should open the report using the same filter
that was used to open/filter the form. This can usually be
done by adding a command button to the form and using the
button's Click event to run code to open the report. The
code could look like:

Me.Dirty = False 'save any edits to current record
DoCmd.OpenReport "report name", acviewPreview, , Me.Filter

The report's record source should be the same table that the
form's query uses.

OTOH, if the form's query and its filtering are too complex
for that, then use the same query as the report's record
source and don't use the form's Filter:

Me.Dirty = False 'save any edits to current record
DoCmd.OpenReport "report name", acviewPreview
 

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