0

I keep getting the Non-Static error even though I have made sure the var that I am using is shared and is NOT null.

        Using context = New iTracContext
            Dim trainingRec As TrainingRecord = context.TrainingRecords.Include("TrainingReference").Include("Employee").SingleOrDefault(Function(r) r.ReferenceID = CurrentReference.id And r.Employee.eid = CurrentEmployee.eid And r.due_date.Year = TrainingManagerForm.YR)
            If Not trainingRec Is Nothing Then
                Dim msg As String = "This module "
                msg = msg + trainingRec.TrainingReference.name + " is currently assigned to this employee with a Due Date of " + trainingRec.due_date
                MsgBox(msg, vbOKOnly, "Module Not Added")
                x = x + 1
            End If
        End Using
wakgtech
  • 75
  • 6

0 Answers0