Archie,
Two question - where in the code would those lines go - I am thinking in the Save button section right after the saving of the recipe to the table?
Try
Me.Validate()
Me.RecipeTableBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.RecipeDataSet11)
MessageBox.Show("The Recipe Has Been Saved", "Information", MessageBoxButtons.OK)
RecipeTableBindingSource.AddNew()
** Here **If NOT RecipeDataSet.RecipTable(0).IsNumberNull then EthernetIPforSLCMicroCom1.Write("N7:10", RecipeDataSet.RecipTable(0).Number)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
** Or Here **If NOT RecipeDataSet.RecipTable(0).IsNumberNull then EthernetIPforSLCMicroCom1.Write("N7:10", RecipeDataSet.RecipTable(0).Number)
End Sub
Then on MainForm I want to show the recipe number (integer from PLC) and also the name, how would I pull the name from the table that matches the recipe number to display it?