title: Nullable object must have a value. VB.NET
body: <p>I need help. I'm having problem in my program. This is my code on my Business logic layer.</p>
  
  <pre><code>Function Load_ItemDetails(ByVal ItemID As String) As Items
      Dim objItemEnt As New tblitem
      Dim objitem As New Items
      Try
          Using da = New DataAccess
              objItemEnt = da.Load_ItemDetails(ItemID)
              With objitem
                  .ItemCode = objItemEnt.ItemCode
                  .ItemName = objItemEnt.ItemName
                  .Description = objItemEnt.Description
                  .NameofType = objItemEnt.NameofType
                  .TypeofPricing = objItemEnt.TypeofPricing
                  .OnStock = objItemEnt.OnStock
                  .ItemPrice = objItemEnt.ItemPrice
                  .DateModified = objItemEnt.DateModified
              End With
              Return objitem
          End Using
      Catch ex As Exception
          Throw
      End Try
  End Function
  </code></pre>
  
  <p>This code is for my data access layer.</p>
  
  <pre><code>Public Function Load_ItemDetails(ByVal ItemCode As String)
      Dim objitem As New tblitem
      Try
          Using entItem = New DAL.systemdbEntities1
              Dim qryUsers = From p In entItem.tblitems
             Where p.ItemCode = ItemCode
             Select p
  
              Dim luser As List(Of tblitem) = qryUsers.ToList
              If luser.Count &gt; 0 Then
                  Return luser.First
              Else
                  Return objitem
              End If
          End Using
      Catch ex As Exception
          Throw
      End Try
  End Function`
  </code></pre>
  
  <p>For my Presentation layer:</p>
  
  <pre><code>Private Sub Load_Item_Detail(ByVal ItemCode As String)
      objItem = New Items
      Using objLogic = New LogicalLayer
          objItem = objLogic.Load_ItemDetails(ItemCode)
          With objItem
              Me.ItemCodetxt.Text = .ItemCode
              Me.ItemNametxt.Text = .ItemName
              Me.ItemDesctxt.Text = .Description
              Me.ItemTypetxt.Text = .NameofType
              Me.ItemPricetxt.Text = .TypeofPricing
              Me.ItemOnstocktxt.Text = CStr(.OnStock)
              Me.ItemPricetxt.Text = CStr(.ItemPrice)
              Me.TextBox1.Text = CStr(.DateModified)
              Me.ItemCodetxt.Tag = .ItemCode
          End With
      End Using
  End Sub`
  </code></pre>
  
  <p>and after I run, I get this error <code>Nullable object must have a value</code> help me. I'm stuck. I don't know what to do guys. I new in n tier architecture.</p>