Click here to Skip to main content
15,917,709 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to pass value of a variable of one form to the next in vb.net Pin
Projrct_Friend's4-Jul-07 21:56
Projrct_Friend's4-Jul-07 21:56 
AnswerRe: How to pass value of a variable of one form to the next in vb.net Pin
Johan Hakkesteegt4-Jul-07 22:14
Johan Hakkesteegt4-Jul-07 22:14 
GeneralRe: How to pass value of a variable of one form to the next in vb.net Pin
Christian Graus5-Jul-07 1:11
protectorChristian Graus5-Jul-07 1:11 
AnswerRe: How to pass value of a variable of one form to the next in vb.net Pin
Mycroft Holmes4-Jul-07 23:01
professionalMycroft Holmes4-Jul-07 23:01 
GeneralRe: How to pass value of a variable of one form to the next in vb.net Pin
Johan Hakkesteegt4-Jul-07 23:21
Johan Hakkesteegt4-Jul-07 23:21 
AnswerRe: How to pass value of a variable of one form to the next in vb.net Pin
Christian Graus5-Jul-07 1:12
protectorChristian Graus5-Jul-07 1:12 
Questionthis code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 21:44
magedhv4-Jul-07 21:44 
AnswerRe: this code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 21:48
magedhv4-Jul-07 21:48 
sorry the code is
        GC.Collect()<br />
<br />
        cmd.Connection.Close()<br />
<br />
<br />
        If cn.State = ConnectionState.Closed Then<br />
            cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=ehab.mdb"<br />
            cn.Open()<br />
<br />
        End If<br />
<br />
<br />
        cmd.Connection = cn<br />
        cmd.CommandType = CommandType.Text<br />
<br />
<br />
<br />
<br />
        Dim h As Integer<br />
        Dim s As String<br />
        s = 0<br />
        h = 0<br />
<br />
        Dim f1, f2, f3, f4, f5, f6, f7, f8 As String<br />
<br />
        f1 = "#" & DateTimePicker1.Value & "#,"<br />
<br />
        f2 = "'" & ComboBox1.Text & "',"<br />
<br />
        f3 = "'" & ComboBox2.Text & "',"<br />
<br />
        f4 = "'" & TextBox1.Text & "',"<br />
<br />
        f5 = "'" & TextBox2.Text & "',"<br />
<br />
        f6 = "'" & TextBox3.Text & "',"<br />
<br />
        f7 = "'" & TextBox4.Text & "',"<br />
<br />
        f8 = "'" & Label10.Text & "'"<br />
<br />
        s = "insert into sale"<br />
        s = s & " (dte,op,nos,cost,coms,nii,npp)values "<br />
<br />
        s = s & "(" & f1 & "," & f2 & "," & f3 & "," & f4 & "," & "," & f5 & "," & "," & f6 & "," & "," & f7 & "')"<br />
<br />
        cmd.CommandText = s<br />
        cmd.ExecuteNonQuery()<br />
        MsgBox("Saved succssefuly")




iam sure it's not wrong
he tell me always ( Syntax error in INSERT INTO statement.)
while the same code was waorking in the form1
plz help
GeneralRe: this code was working in form1 and did not work in form2 Pin
SHatchard4-Jul-07 21:56
SHatchard4-Jul-07 21:56 
GeneralRe: this code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 22:07
magedhv4-Jul-07 22:07 
GeneralRe: this code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 22:11
magedhv4-Jul-07 22:11 
GeneralRe: this code was working in form1 and did not work in form2 Pin
SHatchard4-Jul-07 23:03
SHatchard4-Jul-07 23:03 
GeneralRe: this code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 23:12
magedhv4-Jul-07 23:12 
GeneralRe: this code was working in form1 and did not work in form2 Pin
SHatchard4-Jul-07 23:13
SHatchard4-Jul-07 23:13 
AnswerRe: this code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 23:26
magedhv4-Jul-07 23:26 
GeneralRe: this code was working in form1 and did not work in form2 Pin
Christian Graus5-Jul-07 1:19
protectorChristian Graus5-Jul-07 1:19 
Questionhow can i add check box to gridView header.. Pin
koolprasad20034-Jul-07 21:19
professionalkoolprasad20034-Jul-07 21:19 
AnswerRe: how can i add check box to gridView header.. Pin
DanB19835-Jul-07 4:43
DanB19835-Jul-07 4:43 
QuestionEmbeding all Application settings while compiling. Pin
NANCO4-Jul-07 20:59
NANCO4-Jul-07 20:59 
Questionrestrict open multiple times on same application Pin
PrakashBhaskar4-Jul-07 20:58
PrakashBhaskar4-Jul-07 20:58 
AnswerRe: restrict open multiple times on same application Pin
SHatchard4-Jul-07 21:15
SHatchard4-Jul-07 21:15 
AnswerRe: restrict open multiple times on same application Pin
NANCO4-Jul-07 22:05
NANCO4-Jul-07 22:05 
GeneralRe: restrict open multiple times on same application Pin
PrakashBhaskar4-Jul-07 22:57
PrakashBhaskar4-Jul-07 22:57 
AnswerRe: restrict open multiple times on same application Pin
Rupesh Kumar Swami4-Jul-07 22:21
Rupesh Kumar Swami4-Jul-07 22:21 
GeneralRe: restrict open multiple times on same application Pin
PrakashBhaskar4-Jul-07 22:56
PrakashBhaskar4-Jul-07 22:56 

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

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