# QueryTools is null

**URL:** <https://community.thinkgeo.com/t/querytools-is-null/2361>\
**Category:** WinForms\
**Created:** [March 8, 2014, 2:04pm UTC](https://community.thinkgeo.com/t/querytools-is-null/2361 "2014-03-08T14:04:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/48db29/32.png) [@Robert1](https://community.thinkgeo.com/u/Robert1)\
**Post date:** [March 8, 2014, 2:04pm UTC](https://community.thinkgeo.com/t/querytools-is-null/2361/1 "2014-03-08T14:04:11Z")

</div>

I&nbsp;am&nbsp;new&nbsp;to&nbsp;Map&nbsp;Suite.&nbsp;&nbsp;I&nbsp;was&nbsp;reviewing&nbsp;the&nbsp;sample&nbsp;‘FindTheFeatureAUserClickedOn’.&nbsp;&nbsp;&nbsp;I&nbsp;created&nbsp;a&nbsp;new&nbsp;solution&nbsp;to&nbsp;test&nbsp;the&nbsp;example.&nbsp;&nbsp;In&nbsp;my&nbsp;solution&nbsp;the&nbsp;QueryTools&nbsp;method&nbsp;of&nbsp;the&nbsp;feature&nbsp;layer&nbsp;is&nbsp;null.&nbsp;&nbsp;It&nbsp;exists&nbsp;and&nbsp;runs&nbsp;fine&nbsp;in&nbsp;the&nbsp;HowDoISamples&nbsp;application.&nbsp;&nbsp;Could&nbsp;someone&nbsp;please&nbsp;point&nbsp;out&nbsp;why&nbsp;the&nbsp;method&nbsp;is&nbsp;null&nbsp;in&nbsp;my&nbsp;stand&nbsp;alone&nbsp;solution?

> `private void winformsMap1_MapClick(object sender, MapClickWinformsMapEventArgs e)`  
> `{`  
> `    ``FeatureLayer worldLayer = winformsMap1.FindFeatureLayer("WorldLayer");`  
> `    ``worldLayer.Open();`  
> `    ``Collection<``Feature``> selectedFeatures = worldLayer.QueryTools.GetFeaturesContaining(e.WorldLocation, new string[1] { "CNTRY_NAME" });`  
> `     ``worldLayer.Close();`

---

<div class="post-metadata">

**Author:** ![Robert1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/48db29/32.png) [@Robert1](https://community.thinkgeo.com/u/Robert1)\
**Post date:** [March 9, 2014, 11:50am UTC](https://community.thinkgeo.com/t/querytools-is-null/2361/2 "2014-03-09T11:50:20Z")

</div>

Problem&nbsp;caused&nbsp;by&nbsp;invalid&nbsp;reference&nbsp;to&nbsp;folder&nbsp;containing&nbsp;data.

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [March 9, 2014, 9:22pm UTC](https://community.thinkgeo.com/t/querytools-is-null/2361/3 "2014-03-09T21:22:55Z")

</div>

Hi&nbsp;Robert,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Great&nbsp;to&nbsp;hear&nbsp;the&nbsp;problem&nbsp;is&nbsp;sorted&nbsp;out,&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;question,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Best&nbsp;Regards&nbsp;  
&nbsp;&nbsp;  
&nbsp;Summer
