Pass through error 3070

  • Thread starter Thread starter Jeff C
  • Start date Start date
J

Jeff C

I am using a crosstab query as a control source for a report. The column of
the crosstab is the year field of a dataset, the product of which is
format([mydate],"yy").

Each year I have to modify the report because it is calculating on the year
field (currently 09 and 10)

I use VB to loop through a recordset of facilities as criteria for the
crosstab and report. This early in the year some facilities have no year
"10" so I am getting the error 3070 does not recognize [10] as a fieldname.

What can I use in the code to just move on through this error without
manually clicking the OK button on the error message? I already have
"setwarnings = False".

Thanks for any assistance.
 
In your crosstab query's design view, right-click and choose properties, Now
in the Column Heading property, type in each of the column headings that you
want. That will ensure that the column exists.
 
--
Jeff C
Live Well .. Be Happy In All You Do


Arvin Meyer said:
In your crosstab query's design view, right-click and choose properties, Now
in the Column Heading property, type in each of the column headings that you
want. That will ensure that the column exists.
Beautiful! Never knew that was there .. what a find. Thanks very much!
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Jeff C said:
I am using a crosstab query as a control source for a report. The column
of
the crosstab is the year field of a dataset, the product of which is
format([mydate],"yy").

Each year I have to modify the report because it is calculating on the
year
field (currently 09 and 10)

I use VB to loop through a recordset of facilities as criteria for the
crosstab and report. This early in the year some facilities have no year
"10" so I am getting the error 3070 does not recognize [10] as a
fieldname.

What can I use in the code to just move on through this error without
manually clicking the OK button on the error message? I already have
"setwarnings = False".

Thanks for any assistance.


.
 
Back
Top