Populate 2nd table from form

  • Thread starter Thread starter Linda
  • Start date Start date
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.
 
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
 
Back
Top