<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>accs2014</author_name>
  <author_url>https://blog.hatena.ne.jp/accs2014/</author_url>
  <blog_title>もう一度学ぶMS-Access</blog_title>
  <blog_url>https://www.accessdbstudy.net/</blog_url>
  <categories>
    <anon>Access Tips</anon>
  </categories>
  <description>簡単なクロス集計クエリの例です。 このような設定で「金額」列（数値型）の合計を表示しようとしますが… 該当する値が存在しないところでは値が0ではなくNullとなります。 このようなときにNullではなく0とする方法についてです。 デザインビューに戻って、単純に「金額」を「Nz([金額],0)」などとしたくなりますがそれではエラーとなります。 そこでフィールド欄の式を次のようにし、さらに集計欄で「演算」を選択します（ここが重要）。 金額の合計: CLng(Nz(Sum([金額]),0)) CLng関数で囲んでいるのはNz関数までだと戻り値が文字列になるためですが、ここをどの関数にするかは適宜選択…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.accessdbstudy.net%2Fentry%2F20080711%2Fp1&quot; title=&quot;クロス集計クエリで集計値がNullとなるのを0にする - もう一度学ぶMS-Access&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/a/accs2014/20180527/20180527235204.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-07-11 00:00:00</published>
  <title>クロス集計クエリで集計値がNullとなるのを0にする</title>
  <type>rich</type>
  <url>https://www.accessdbstudy.net/entry/20080711/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
