R REVBJONES Aug 19, 2004 #1 How do I open a report from a form, viewing the SAME record I'm on in the from in the report Bennie
G Graham R Seach Aug 19, 2004 #2 Bennie, Presumably the report is based on the same table/query as the form. If this is the case, then all you need to do is call the report using the OpenReport method, and supply a filter clause based on the current primary key value. DoCmd.OpenReport "rptMyReport", acViewPreview, , "myPrimaryKey = " & Me!MyFormsPrimaryKey Regards, Graham R Seach Microsoft Access MVP Sydney, Australia Microsoft Access 2003 VBA Programmer's Reference http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
Bennie, Presumably the report is based on the same table/query as the form. If this is the case, then all you need to do is call the report using the OpenReport method, and supply a filter clause based on the current primary key value. DoCmd.OpenReport "rptMyReport", acViewPreview, , "myPrimaryKey = " & Me!MyFormsPrimaryKey Regards, Graham R Seach Microsoft Access MVP Sydney, Australia Microsoft Access 2003 VBA Programmer's Reference http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html