473,416 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

From cross tab query to report: Error Microsoft jet database

22
Hi friends,
Im getting an error [The microsoft jet database engine does not recognize" " as valid field name or expression] when running my report which is related to a crosstab.my crosstab query will display null but when i run the report some of the fields are blanks.
e.g In my cross tab query:
Completed: 2
InProgress: 3
Pending:
But when i run the report it does not recognize the field pending and give the error i mentioned above.
Any suggestions???Thx
Rama
Aug 28 '07 #1
6 4456
puppydogbuddy
1,923 Expert 1GB
Hi friends,
Im getting an error [The microsoft jet database engine does not recognize" " as valid field name or expression] when running my report which is related to a crosstab.my crosstab query will display null but when i run the report some of the fields are blanks.
e.g In my cross tab query:
Completed: 2
InProgress: 3
Pending:
But when i run the report it does not recognize the field pending and give the error i mentioned above.
Any suggestions???Thx
Rama
Rama,

Try wrapping Pending with the Null To Zero function:
Nz([Pending],0)
Aug 28 '07 #2
ramab
22
Rama,

Try wrapping Pending with the Null To Zero function:
Nz([Pending],0)
Hi,the thing is that "pending" is the field generated when i run the report. if i previously run the report where the heading pending header is generated,then when i run my report again but that there is no pending field,it will give me Microsoft jet database engine error.
Thx
Aug 29 '07 #3
puppydogbuddy
1,923 Expert 1GB
Hi,the thing is that "pending" is the field generated when i run the report. if i previously run the report where the heading pending header is generated,then when i run my report again but that there is no pending field,it will give me Microsoft jet database engine error.
Thx
You need to provide more details.
1. How do Completed, In Progress, and Pending appear in your crosstab query grid? are they column names or are they values appearing under a column like Status?
2. The best place to fix these types of problems is in your query. You've indicated that you are getting nulls......If "completed", "in progress", etc are values appearing in a column of your query, then all you need to do is enter the following in the criteria row of the column that returns the nulls >>>>Is Not Null
3. If In Progress, etc. is a field/column name in your crosstab, then you can eliminate the problem with nulls by "fixing" your column names in the pivot clause in sql view like this :

Pivot XXXXXXXXXXXXXX In ("Completed","In Progress","Pending");
Aug 29 '07 #4
ramab
22
Hi, I hope the detail below is ok. Thx

The crosstab query

The SQL
TRANSFORM Count(CORRECTIVE_ACTIONS_V6_1.FOL_STAT_CODE) AS CountOfFOL_STAT_CODE
SELECT CORRECTIVE_ACTIONS_V6_1.DEPT_NAME, Count(CORRECTIVE_ACTIONS_V6_1.FOL_STAT_CODE) AS [Total Of FOL_STAT_CODE]
FROM CORRECTIVE_ACTIONS_V6_1
GROUP BY CORRECTIVE_ACTIONS_V6_1.DEPT_NAME
PIVOT CORRECTIVE_ACTIONS_V6_1.STAT_DESC;

The datasheet

Total Of FOL_STAT_CODE Completed In Progress

DepartmentName1 5 5
DepartmentName2 4 2 2
DepartmentName3 3 1 2


[The fol_stat_code that generates the field completed, in progress. I have a form where I specify which department I want; if I select all departments then I have no problem but if I select departmentname1 then as the field In Progress is empty then I get the problem jet data base, this is because (Im not sure) that the field in progress was created previously. ]

I then use this cross tab query to build the report.
Aug 29 '07 #5
puppydogbuddy
1,923 Expert 1GB
Hi, I hope the detail below is ok. Thx

The crosstab query

The SQL
TRANSFORM Count(CORRECTIVE_ACTIONS_V6_1.FOL_STAT_CODE) AS CountOfFOL_STAT_CODE
SELECT CORRECTIVE_ACTIONS_V6_1.DEPT_NAME, Count(CORRECTIVE_ACTIONS_V6_1.FOL_STAT_CODE) AS [Total Of FOL_STAT_CODE]
FROM CORRECTIVE_ACTIONS_V6_1
GROUP BY CORRECTIVE_ACTIONS_V6_1.DEPT_NAME
PIVOT CORRECTIVE_ACTIONS_V6_1.STAT_DESC;

The datasheet

Total Of FOL_STAT_CODE Completed In Progress

DepartmentName1 5 5
DepartmentName2 4 2 2
DepartmentName3 3 1 2


[The fol_stat_code that generates the field completed, in progress. I have a form where I specify which department I want; if I select all departments then I have no problem but if I select departmentname1 then as the field In Progress is empty then I get the problem jet data base, this is because (Im not sure) that the field in progress was created previously. ]

I then use this cross tab query to build the report.
Try changing this:
PIVOT CORRECTIVE_ACTIONS_V6_1.STAT_DESC;

To This:
PIVOT CORRECTIVE_ACTIONS_V6_1.STAT_DESC IN ("COMPLETED","IN PROGRESS", "PENDING") ;
Aug 29 '07 #6
ramab
22
Try changing this:
PIVOT CORRECTIVE_ACTIONS_V6_1.STAT_DESC;

To This:
PIVOT CORRECTIVE_ACTIONS_V6_1.STAT_DESC IN ("COMPLETED","IN PROGRESS", "PENDING") ;

Thx a lot. It work;-)
Aug 30 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Nicola | last post by:
Hi Everyone, I am new to programming and would like to know how to open an access Report from within vb 6. I am trying to write a program to organise cross stitch threads. I have found out how...
8
by: Donna Sabol | last post by:
First, I should start by saying I am creating a database to be used by some very impatient, non-computer literate people. It needs to be seameless in it's operation from their point of view. I...
6
by: John | last post by:
Hi, I have simple database based on 3 tables. Relationship is 'one to many' between table 1 and 2, also between 2 and 3 table'one to many'. I have made form where I enter data in all 3 tables....
6
by: HD | last post by:
Hello. For the following, I would appreciate if anyone could tell me: if it can be done, how it might done, and/or what search terms I could use to find the solution myself. I would like to...
2
by: Keith Wilby | last post by:
I have a report that is based upon a crosstab query which return only the columns (fields) it has data for. When my report runs it sometimes fails because some of the text boxes don't have a field...
1
by: Intrepid_Yellow | last post by:
Hi, I have the following code that runs my report generator. The user selects a table from a combo box, then whatever fields they want from a list box. (This part all works and the report runs...
8
by: nishkrish | last post by:
Hi, I am new to access I created the form and report from Allen Browne's Frmwhat Date the way he has described but when i preview report it shows StartDate: name? Enddate: name? am i suppose...
6
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate...
1
by: davidwelli | last post by:
Hello, I have a Access 200 format database that contains contact details and a picture for each record. The contact details are held in one table and the images are held in another as OLE...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.