Dennis said:
Yes, I have double checked the name of the subreport control, and it is
srptDetail. I'd already tried the breakpoiont idea, and the record value
returned is exactly what I need. The error I'm getting is as follows:
Run-time error 3011:
The Microsoft Jet database engine could not find the object
'~sq_drptRequestShell~sq_dsrptDetail'.
I understand that this means it can't find the subreport container itself,
yet it shows up in the Object browser, and I get the object's name showing
up when I hit Ctrl-J during coding. I've backed up and done a complete
decompile and recompile just in case there was any corruption, and the
problem still persists.
Now, that is an interesting(?) error message!?
I don't think that it's complaining about not finding your
report object. It looks a lot more like it's looking for a
internally saved query. Let's focus our attention on the
two report's RecordSource. I have no idea how it could
happen, but I think the error message might indicate that
one or the other reports has an SQL statement in its record
source, which Access saved under that funky name, but now it
can't be found. At this point, I am inclined to lean
towards corruption and I suggest that you do a
Compact/Repair and, if that doesn't help, import everything
into a new blank mdb.
One other off the wall thing to try is shaking it until
something loose falls out ;-)
What I mean is try retyping the record source query to see
if that will force Access to resave it under another name
and maybe it will be able to keep track of it this time???
Keeping my fingers crossed,