Crosstab query problem

  • Thread starter Thread starter dogman_2000
  • Start date Start date
D

dogman_2000

I have a crosstab query which I am using as my recordsource for a
report I have.
Because sometimes I have more or less columns in my query I get the
following problem when I run my report:

The Microsoft Jet database engine does not recognise [FieldName] as a
valid field name or expression.

I understand this problem but can anyone tell me if it's possible to
trap this error and ignore it so that the report\query still runs? I
realise that the field will have errors in it but this doesn't worry
me.

Any help\alternative suggestion would be greatly appreciated.

Andrew
 
Try something like Null, Empty or Is Null for the less/missing
columns_names in your query
might work

also found some error code, use your own case number.

ErrorCode:
Select Case Err.Number
Case 3265 'Something not found
Something = False
Resume ExitCode
Case Else
MsgBox "Error " & Err.Number & ": " & Err.Description,
vbCritical, "hlfUtils.TableExists"
Resume ExitCode
End Select
 
Isn't this the same question you asked in the report's news group? You
didn't respond to my reply there.
 
Back
Top