Private Sub PopulateTheDataGridWithData()
' SQL for the DataGrid.
'----------------------
strSqlStatement = _
"SELECT Format(INGREDIENT, ""Percent"") AS [Ingredient], " & _
"Format(PERCENT_FORM, ""Percent"") AS [Percent Form], " & _
"Percent_Form * 2000 AS [Ton Form], " & _
"Format(PROTEIN_VALUE, ""Percent"") AS [Protein Value], " & _
"Format(Percent_Form * Protein_Value, ""Percent"") AS [Protein Units], " & _
"Format(FAT_VALUE, ""Percent"") AS [Fat Value], " & _
"Format(Percent_Form * Fat_Value, ""Percent"") AS [Fat Units], " & _
"Format(FIBER_VALUE, ""Percent"") AS [Fiber Value], " & _
"Format(Percent_Form * Fiber_Value, ""Percent"") AS [Fiber Units], " & _
"Format(ASH_VALUE, ""Percent"") AS [Ash Value], " & _
"Format(Percent_Form * Ash_Value, ""Percent"") AS [Ash Units], " & _
"Format(COST_PER_POUND, ""Currency"") AS [Cost Per Pound] " & _
"FROM Ingredients "
' Load the data into the grid with this query.
'---------------------------------------------
objIngredientsDataTable = objClassDatabaseObjects.GetDataTable(strSqlStatement, _
"Ingredients Data", _
"Ingredient")
LightGridIngrediants.DataSource = objIngredientsDataTable