Hiding the form will probably do all you need.
In Access 2002 and 2003, you can open a report modally if you need to:
DoCmd.OpenReport "MyReport", WindowMode:=acDialog
An underlying issue is why the form needs to be open and not changed?
If the report is dependent on the form in some way, you may be able to avoid
that by reading the values from the form in the Report Header secton's
Format event, and assigning the values to unbound controls on the report,
instead of binding those controls to an expression that looks at the form.
Alternatively, if the problem is that the user flicks back to the form and
hits the your OpenReport command button again which does not filter the
report correctly, you may want to code to close the report and reopen it:
strDoc = "MyReport"
If SysCmd(acSysCmdGetObjectState, acReport, strDoc) = 1 Then
DoCmd.Close acReport, strDoc
End If
DoCmd.OpenReport strDoc
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Deano" <de*********@hotmail.com> wrote in message
news:3b*******************@wards.force9.net...
I've been mulling over how to prevent users from clicking back onto my
form after they have run a report. I want them to close the report first.
The simple solution which I have tested successfully is simply to hide the
calling form and make is visible again in the Close event of the report.
Seems fine to me but can anyone see any flaws in this?