Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filling empty field values in a crosstab query !!!!! 1

Status
Not open for further replies.

120282

Technical User
Jul 30, 2003
9
0
0
GB
I need to fill the field values that have been returned empty on a crosstab query.

Or if there is a way to add fields values including empty ones.eg

mon tues wed thur fri total
3 4 1 1 3 12
2 2 1 2
1 4 2 5
 
do you mean instead of blank you want them to be zero?
in your query you can try either
nz(FieldName,0) and if that doesn't work,
iif(FieldName = null,0,FieldName)
 
if i enter either of these in the expression builder it returns a syntax errors.
Where should i be entering them?

Thanx
120282
 
Create a Select query using your crosstab query as the input source. Now use the NZ(FieldName,0) on each of your column values including the total column. This will fill each of your empty spots with a zero. The totals are not rolling up for you because there is a null value as one of the column values for that row.

Post back with more questions.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
thread702-610860

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top