A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Crosstab query problem



 
 
Thread Tools Display Modes
  #1  
Old October 4th, 2006, 08:11 PM posted to microsoft.public.access.queries
[email protected]
external usenet poster
 
Posts: 5
Default Crosstab query problem

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

  #2  
Old October 5th, 2006, 02:44 AM posted to microsoft.public.access.queries
NielsM
external usenet poster
 
Posts: 2
Default Crosstab query problem

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

  #3  
Old October 5th, 2006, 04:27 AM posted to microsoft.public.access.queries
Duane Hookom
external usenet poster
 
Posts: 2,251
Default Crosstab query problem

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

--
Duane Hookom
MS Access MVP

wrote in message
ups.com...
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.