Killsoft Sugdok


Join the forum, it's quick and easy

Killsoft Sugdok
Killsoft Sugdok
Would you like to react to this message? Create an account in a few clicks or log in to continue.

help me vb.net whent try record in access 2013

3 posters

Go down

help me vb.net whent try record in access 2013 Empty help me vb.net whent try record in access 2013

Post by zedron 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

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

Post by giovhz 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
giovhz
giovhz
Newbie
Newbie

Posts : 41
Join date : 2013-03-09

Back to top Go down

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

Post by zedron 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

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

Post by giovhz 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
giovhz
giovhz
Newbie
Newbie

Posts : 41
Join date : 2013-03-09

Back to top Go down

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

Post by putayputay 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

help me vb.net whent try record in access 2013 Empty 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

- Similar topics

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