By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,572 Members | 963 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,572 IT Pros & Developers. It's quick & easy.

#error in report w/linked tables

P: n/a
Jer
Using Access 2003 w/Windows XP.
I have a database originally created with the tables internal. I split
the database into a front-end/back-end with linked tables. Now when I
open one of the reports, I get #error in some of the fields. I created
two new databases from scratch and imported the front-end objects into
one database and imported the tables into the other and re-linked them.
I still get the error.
The report is opened from a form, using docmd.openreport specifying a
where clause. If I open the report directly, without the where clause,
there are no errors.
If I import the tables back into the front end, then the errors go
away.
Any ideas?
Thanks,
Jerry

Dec 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In the DoCmd.OpenReport statement, check your WHERE clause to make sure
it appropriately references your linked tables. Also make sure the
fields referenced by your WHERE clause still exist in the query that
your report has for its Record Source property. If these are all okay,
post the names of your linked tables, the names of your linked tables
and the SQL from your report's Record Source query.

Dec 13 '05 #2

P: n/a
Jer
The WHERE clause looks correct. The problem is actually in a
subreport. The report has 15 subreports with a MASTER link control of
CPID and child link field of CP_ID. All of the queries on the
subreports contain the field CP_ID. All of the subreports display data
correctly except one. I get an #error on the main report because I'm
try to pull a total from the subreport. I use the following code to
make sure the subreport has data
IIf(LaborGA.Report.HasData=-1,CLng(LaborGA!totalLaborGA),0)
When I open the main report in design mode the CPID control indicates
an error that CP_ID is not in the field list, but it is. When I
reselect it the control error goes away. When I open the report again,
it is missing data still. I go into design mode and the CPID control
is indicating the same missing field error.

I know this all sounds bizarre. But that's why I'm here.

Dec 14 '05 #3

P: n/a
I'm not entirely sure I understood everything there...could you clarify
something? It may be just a typo or my misunderstanding, but when you
view the report in Design view, the CPID control says "#ERROR" in it?

Regardless of that, have you checked to make sure the subreport has a
field called CP_ID? And that the query underlying that subreport
selects a field called CP_ID? Usually when you get #ERROR it indicates
a problem with syntax - usually, in my experience, it's because of a
misspelled field name or a slightly off formula.

Dec 14 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.