Maybe someone could save me some time
Im trying to learn as I go and reached a sticking point that I'm
having a problem finding a direct answer to on the web
I want to refine a query and update a record (or records if possable)
Notes are in the following code
Thanks For your help
Code:Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Do Me.Show() Me.Activate() Dim BARCODE As String = InputBox("Enter Equipment Barcode") 'storing the text entered in a string If BARCODE <> "" Then 'Load the Record into my form 'I Want To only Get a Record if the RETURNDATE Colum is blank 'My fillby query is Select F1,F2...Ect FROM SignedOutEquipment ' WHERE (BARCODE=@BARCODE) ' And Works Fine Try Me.SignedOutEquipmentTableAdapter.FillBy(Me.SignoutDataSet.SignedOutEquipment, BARCODE) If Me.SignoutDataSet.SignedOutEquipment.Rows.Count = 0 Then MsgBox("That Item Was Not Signed Out", MsgBoxStyle.Critical, "Barcode Not Signed OUT") Me.Close() End If 'Here I insert todays date into the form Dim now As Date = Date.Now now.ToString("F") RETURNDATE.Text = now 'Now I want to Update the record with the RETURNDATE Field 'and save it back to the Database Catch ex As System.Exception System.Windows.Forms.MessageBox.Show(ex.Message) End Try Else : Me.Close() Exit Do End If Loop End Sub


Reply With Quote