Click here to Skip to main content
11,482,402 members (71,329 online)
Click here to Skip to main content

Tagged as

Solo Button Application

, 19 Apr 2010 CPOL 19.8K 2
Rate this:
Please Sign up or sign in to vote.
Public Class Form1 '********************************************************************************************************************************* 'I am just printing messagebox 'you can replace this with other calling values 'for eg. Dim com As New OleDbCommand ' ...
Public Class Form1
    '*********************************************************************************************************************************
    'I am just printing messagebox
    'you can replace this with other calling values
    'for eg. Dim com As New OleDbCommand
    '        com.Connection = con
    '        com.CommandText = "insert into members values(" & Val(TextBox1.Text) & ",'" & TextBox2.Text & "','" & _
    '                            TextBox3.Text & "','" & ComboBox1.Text & "'," & CheckBox1.Checked & "," & CheckBox2.Checked & "," & _
    'DateTimePicker1.Text & "," & DateTimePicker2.Text & ",'" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & _
    '"','" & TextBox7.Text & "'," & DateTimePicker3.Text & ",'" & TextBox8.Text & "','" & TextBox9.Text & "')"
    '        com.ExecuteNonQuery()
    '        MsgBox("Record Inserted")
    'same with delete and update & so on......
    '*********************************************************************************************************************************
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
         If Button1.Text = "Add" Then
            MsgBox("Record Inserted")
            Button1.Text = "Update"
        ElseIf Button1.Text = "Update" Then
            MsgBox("Record Modified")
            Button1.Text = "Delete"
        Else
            MsgBox("Record Removed")
            Button1.Text = "Add"
        End If
    End Sub
 
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Close()
    End Sub
End Class

License

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

Share

About the Author

No Biography provided

Comments and Discussions

 
GeneralReason for my vote of 5 It may be real simple, but it's got ... Pin
drummerboy051124-Mar-11 12:24
memberdrummerboy051124-Mar-11 12:24 
GeneralMy vote of 1 Pin
Johnny J.19-Apr-10 22:00
memberJohnny J.19-Apr-10 22:00 
GeneralMy vote of 1 Pin
SledgeHammer0119-Apr-10 6:02
memberSledgeHammer0119-Apr-10 6:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150520.1 | Last Updated 19 Apr 2010
Article Copyright 2010 by Pratik M Mahajan
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid