# MS Access Question

**URL:** <https://boards.straightdope.com/t/ms-access-question/65333>\
**Category:** Factual Questions\
**Created:** [May 13, 2001, 8:01pm UTC](https://boards.straightdope.com/t/ms-access-question/65333 "2001-05-13T20:01:26Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![Zot](https://avatars.discourse-cdn.com/v4/letter/z/e79b87/32.png) [@Zot](https://boards.straightdope.com/u/Zot)\
**Post date:** [May 15, 2001, 2:10pm UTC](https://boards.straightdope.com/t/ms-access-question/65333/21 "2001-05-15T14:10:47Z")

</div>

> [@](#):
>
> \*Originally posted by jbird3000 \*  
> **I don’t wanna sound like a total idiot, but can you please change your coding so that… "Customers becomes “Website” and “Product” becomes “Webmaster”. I tried, but I’m getting a headache just looking at it. Thank you.**

I’m not sure if you’re asking me or **Libertarian**. Here is my query with the substitutions. You will have to replace tablename with the name of the table (or query) that you are analyzing. You will still need CommaList function from above.

```auto

SELECT tablename.Website,
CommaList("tablename","Webmaster","Website",[Website])
AS Expr1
FROM tablename
GROUP BY tablename.Website;

```

---

<div class="post-metadata">

**Author:** ![jbird3000](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jbird3000](https://boards.straightdope.com/u/jbird3000)\
**Post date:** [May 16, 2001, 2:08am UTC](https://boards.straightdope.com/t/ms-access-question/65333/22 "2001-05-16T02:08:41Z")

</div>

Zot… Again, idiotic question, but when I run the query, it tells me undefined function. Where do I put the code for the function?

---

<div class="post-metadata">

**Author:** ![Zot](https://avatars.discourse-cdn.com/v4/letter/z/e79b87/32.png) [@Zot](https://boards.straightdope.com/u/Zot)\
**Post date:** [May 16, 2001, 4:04am UTC](https://boards.straightdope.com/t/ms-access-question/65333/23 "2001-05-16T04:04:09Z")

</div>

Click on the **Modules** tab in the database window. Click on the **New** button to create a new module and paste the code for the function into the module.

---

<div class="post-metadata">

**Author:** ![jbird3000](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jbird3000](https://boards.straightdope.com/u/jbird3000)\
**Post date:** [May 16, 2001, 5:04am UTC](https://boards.straightdope.com/t/ms-access-question/65333/24 "2001-05-16T05:04:27Z")

</div>

> [@](#):
>
> \*Originally posted by Zot \*  
> \*\*Click on the **Modules** tab in the database window. Click on the **New** button to create a new module and paste the code for the function into the module. \*\*

That’s what I did at first. It doesn’t work.

---

<div class="post-metadata">

**Author:** ![jbird3000](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jbird3000](https://boards.straightdope.com/u/jbird3000)\
**Post date:** [May 16, 2001, 5:28am UTC](https://boards.straightdope.com/t/ms-access-question/65333/25 "2001-05-16T05:28:34Z")

</div>

By jove, man… It works. You are my new God.

The problem I had was that I called the module the same thing as the function. I also had to go change all the Null values to “Unknown”, which I was gonna do anyway.

THANK YOU.

---

<div class="post-metadata">

**Author:** ![Zot](https://avatars.discourse-cdn.com/v4/letter/z/e79b87/32.png) [@Zot](https://boards.straightdope.com/u/Zot)\
**Post date:** [May 16, 2001, 2:35pm UTC](https://boards.straightdope.com/t/ms-access-question/65333/26 "2001-05-16T14:35:15Z")

</div>

Glad to be of service.

– Zot (God of Procrastination)

[Previous page](https://boards.straightdope.com/t/ms-access-question/65333.md?page=1)
