TypeMismatchException reading Dictionary value

Why am I receiving a TypeMismatchException?

[code]Private mStatus As String

Private Sub UpdateProjectLists()
Using xojo.Core

Dim dict As new Dictionary

dict.Value(“list”) = enumList.ProjectLists
dict.Value(“id”) = ProjectID
dict.Value(“assigned”) = mAssigned
dict.Value(“owner”) = Session.userID
dict.Value(“status”) = mStatus
dict.Value(“due”) = mDue
dict.Value(“selected”) = mList

ccLists1.LoadList(dict)
End Sub

Sub LoadList(dict As xojo.Core.Dictionary)
Using xojo.Core

Select Case dict.Value(“list”)
Case enumList.ProjectLists
filterID = "project_items.prj_id = " + CStr(dict.Value(“id”))
if dict.Value(“assigned”) > 0 then filterText = filterID + " AND project_items.item_assigned_to = " + CStr(dict.Value(“assigned”))

if dict.Value(“status”) = “C” then <<<< [TypeMismatchException]
filterText = filterText + " AND project_items.completed > 0"

elseif dict.Value("status") = "O" then
  filterText = filterText + " AND project_items.completed = 0"
  
end if


End Select
End Sub

[/code]

What is the type of mStatus?

dict.Value(“status”) is an Auto
“C” is a TEXT literal

Can you use a TEXT instead of a string for mStatus ?

  Using xojo.Core
  
  dim mStatus As text = "c" // <<< if you make this a STRING you will get a type mismatch
  
  Dim dict As new Dictionary
  dict.Value("status") = mStatus
  
  dim a as auto = dict.Value("status")
  
  if dict.Value("status") = "C" then
    break
  else
    break
  end if

Sorry, didn’t post my code clearly.

Private mStatus As String Is a property in the ControlContainer(CC1) where Private Sub UpdateProjectLists() resides. Sub LoadList(dict As xojo.Core.Dictionary) is a method of another ControlContainer(CC2) that is an object in CC1.

mStatus is defined as a String