Killsoft Sugdok

help me vb.net whent try record in access 2013

Go down

help me vb.net whent try record in access 2013

Post by zedron on Thu Nov 21, 2013 7:59 am

hello

i trying to know how i record to access db when i use RadioButton to give in db yes or no

i put 2 Radiobutton one for yes other for no

i want to know to i make it to record yes or no to access db please help

using vb.net 2012 
access 2013

thanks for help us to be good programing

zedron
Newbie
Newbie

Posts : 5
Join date : 2013-11-12

Back to top Go down

Re: help me vb.net whent try record in access 2013

Post by giovhz on Thu Nov 21, 2013 8:36 am

try this sir!

Code:
  If RadioButton1.Checked = True Then
          code for checked

        Else
          code for none checked

  End If

/
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this link.]
avatar
giovhz
Newbie
Newbie

Posts : 41
Join date : 2013-03-09

Back to top Go down

Re: help me vb.net whent try record in access 2013

Post by zedron on Thu Nov 21, 2013 12:51 pm

not work

error on :

If RadioButton1.Checked = True Then
          code for checked 

        Else
          code for none checked

  End If

zedron
Newbie
Newbie

Posts : 5
Join date : 2013-11-12

Back to top Go down

Re: help me vb.net whent try record in access 2013

Post by giovhz on Thu Nov 21, 2013 1:01 pm

zedron wrote:not work

error on :

If RadioButton1.Checked = True Then
          code for checked 

        Else
          code for none checked

  End If
I mean!


If RadioButton1.Checked = True Then
          code for checked 
your own program!

        Else
          code for none checked

End If 

Like!


If RadioButton1.Checked = True Then
        label1.text = "Checked"

        Else
          label1.text = "Not Checked"

  End If

/
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this link.]
avatar
giovhz
Newbie
Newbie

Posts : 41
Join date : 2013-03-09

Back to top Go down

Re: help me vb.net whent try record in access 2013

Post by putayputay on Sat Nov 23, 2013 5:18 pm

Dim Query As String
    Sub INSERT_QUERY()
        Dim cmd As New MySqlCommand
        With cmd
            .CommandText = Query
            .Connection = con
            .ExecuteNonQuery()
        End With
    End Sub
    ' 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If RadioButton1.Checked = True Then
            Query = "INSERT INTO yesorno(YN) VALUES ('" & RadioButton1.Text & "')"
            INSERT_QUERY()
            MsgBox("YES")
            Exit Sub
        ElseIf RadioButton2.Checked = True Then
            Query = "INSERT INTO yesorno(YN) VALUES ('" & RadioButton2.Text & "')"
            INSERT_QUERY()
            MsgBox("NO")
            Exit Sub
        End If
    End Sub

try this...sorry for l8 rply..

putayputay
Newbie
Newbie

Posts : 10
Join date : 2013-03-09

Back to top Go down

Re: help me vb.net whent try record in access 2013

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum