# Categories not generating

**URL:** <https://mapwindow.discourse.group/t/categories-not-generating/863>\
**Category:** Uncategorized\
**Created:** [January 13, 2021, 3:39am UTC](https://mapwindow.discourse.group/t/categories-not-generating/863 "2021-01-13T03:39:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stu](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@stu](https://mapwindow.discourse.group/u/stu)\
**Post date:** [January 13, 2021, 3:39am UTC](https://mapwindow.discourse.group/t/categories-not-generating/863/1 "2021-01-13T03:39:06Z")

</div>

Hi Jerry

MapWinGIS version 5.2.4 64 bit Windows 10, MS Access 365 VBA

Whats my problem?

- I am trying to generate categories, but they don’t appear on the map.

What I am trying to do?

- create a map of roads that are classified by proposed maintenance treatments.

- Load the 5 treatment categories into the map, and set colors for each treatment

- I use the following code to do this:

and after all treatments are loaded, run

```
 sf_Lines.Categories.ApplyExpressions

```

I believe the code is working. I exported the Category settings to XML and it appears all my settings are there.

```
 Map0.SaveLayerOptions(0, "Line_Samples.txt", True, "")

```

![image](https://global.discourse-cdn.com/free1/uploads/mapwindow1/original/1X/f098891a574c0939dfd062932f67ae6ba2bfd92c.png)

Thanks  
Stu

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [January 13, 2021, 6:17am UTC](https://mapwindow.discourse.group/t/categories-not-generating/863/2 "2021-01-13T06:17:46Z")

</div>

Hello Stu.

If the Treatment value is a string, you need to put it in quotes, something like

```
.Expression = "[TREATMENT] = """ & Treatment & """"

```

See if that does it…

Regards,  
Jerry.

---

<div class="post-metadata">

**Author:** ![stu](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@stu](https://mapwindow.discourse.group/u/stu)\
**Post date:** [January 13, 2021, 11:40am UTC](https://mapwindow.discourse.group/t/categories-not-generating/863/3 "2021-01-13T11:40:45Z")

</div>

Jerry

It works beautifully!

Thank you very much

Stu

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [January 5, 2022, 10:51am UTC](https://mapwindow.discourse.group/t/categories-not-generating/863/4 "2022-01-05T10:51:21Z")

</div>


