Crosstab query problem

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
 
N

NielsM

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
 
D

Duane Hookom

Isn't this the same question you asked in the report's news group? You
didn't respond to my reply there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top