Hi,
I'm currently designing a database.
I have a main table and a one - to many related table.
The main table (MASTERTABLE) stores details of a group.
The related table (Presenter) stores meeting records.
I'm writing this database in access 2007, but in 2003 format as the end result will be used in 2003 (irritating corporate policies!!).
I have a button to open the current record in a report. Said report (based on "MASTERTABLE" has a sub report to show the "one to many" related record for meeting dates (Presenter).
Now my current code to do this is as follows:
This works fine in 2007, and is ok in 2003, except for one scenario:
I can open the current record providing there are no record related to it in the subreport.
when there are, access 2003 generates an error about the reference to "ID" and refuses to open the report. 2007 however happily does what it is told.
I had the feeling that the field on the subreport called "ID" (being the key field) may have messed with this, and i renamed it to ID2, only to find earlier today that this did not resolve the issue.
I have tired several "older" ways of calling the current record, all of which work in 2007. Some taken from 2003 tutorials.
any ideas on this conundrum?
I can supply more code or samples from the database if required.
I'm currently designing a database.
I have a main table and a one - to many related table.
The main table (MASTERTABLE) stores details of a group.
The related table (Presenter) stores meeting records.
I'm writing this database in access 2007, but in 2003 format as the end result will be used in 2003 (irritating corporate policies!!).
I have a button to open the current record in a report. Said report (based on "MASTERTABLE" has a sub report to show the "one to many" related record for meeting dates (Presenter).
Now my current code to do this is as follows:
Code:
RunCommand acCmdSaveRecord
DoCmd.OpenReport "CFG Extract", acViewPreview, , "id=" & Me![ID]
This works fine in 2007, and is ok in 2003, except for one scenario:
I can open the current record providing there are no record related to it in the subreport.
when there are, access 2003 generates an error about the reference to "ID" and refuses to open the report. 2007 however happily does what it is told.
I had the feeling that the field on the subreport called "ID" (being the key field) may have messed with this, and i renamed it to ID2, only to find earlier today that this did not resolve the issue.
I have tired several "older" ways of calling the current record, all of which work in 2007. Some taken from 2003 tutorials.
any ideas on this conundrum?
I can supply more code or samples from the database if required.