Click here to Skip to main content
15,914,500 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a problem at this point. My aim is that when the svb.text="Update" it should update the data.. heres my code
VB
If t8.Text < DateTime.Now.ToString("MMMM dd,yyyy") Then
            MsgBox("You cannot assign the burial date because it was already elapsed", MsgBoxStyle.Information, "Cannot be")
            t8.Text = DateTime.Now.ToString("MMMM dd,yyyy")
End If

If CheckBox1.Checked = True Then
     If svb.Text = "SAVE" Then
            If t1.Text.Length = 0 Or t2.Text.Length = 0 Or t3.Text.Length = 0 Or t4.Text.Length = 0 Or _
               t5.Text.Length = 0 Or t6.Text.Length = 0 Or t7.Text.Length = 0 Or t8.Text.Length = 0 Or _
               t9.Text.Length = 0 Or t10.Text.Length = 0 Or t11.Text.Length = 0 Then
                    MsgBox("You cannot add null values", MsgBoxStyle.Information, "Null")
                    Refresh()
            Else
                    roomIsAvailable1()
            End If

     ElseIf svb.Text = "Update" Then
         roomIsAvailable2()
     End If

ElseIf CheckBox1.Checked = False Then
            MsgBox("Reservation cannot be added because the required documents are not present, please check the checkbox if it is already presented", MsgBoxStyle.Exclamation, "Documents not presented")
End If



t8.text is a datetimepicker where if the date is lesser than the recent date, it will show a msgbox.
svb is the button

What I have tried:

Before, it worked but this time.. nothing happens...
Posted
Updated 16-Feb-16 0:05am
v4

1 solution

Try this:

VB
If svb.text="Update" Then
   ' Update data
End If
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900