hello guys ! here's my code , how can i put my data into adodc2 from adodc1 ? look .. there's some error there .. do help me ..
Private Sub Command1_Click()
Frame3.Visible = True
Frame1.Visible = False
Frame2.Visible = False
Text3.Text = Val(qtyOnHandTxt.Text) * Val(Text1.Text)
End Sub
Private Sub Command2_Click()
iCodeTxt.SetFocus
iCodeTxt.Enabled = True
iDescTxt.Enabled = True
qtyOnHandTxt.Enabled = True
qtyToAddTxt.Enabled = True
Adodc2.Recordset.AddNew
End Sub
Private Sub Command3_Click()
Frame3.Visible = False
Frame1.Visible = True
Frame2.Visible = True
dCombo1.Text = ""
iCodeTxt.Text = ""
qtyOnHandTxt = ""
Text1.Text = ""
End Sub
Private Sub Command4_Click()
Adodc2.Refresh
iCodeTxt.Text = dCombo1.Text
Adodc2.Recordset!iDescTxt = OrderDescription
Adodc2.Recordset!qtyOnHandTxt = OrderPrice
Adodc2.Recordset!Text1 = quantity
Adodc2.Recordset.Update
End Sub
Private Sub Command6_Click()
MDIForm1.Show
Unload OrderForm
End Sub
Private Sub dCombo1_Change()
iCodeTxt.Text = dCombo1.Text
RefreshEntries
End Sub
Private Sub RefreshEntries()
If Not iCodeTxt = "" Then
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.Find "iCode =" & iCodeTxt.Text
If Not Adodc1.Recordset.EOF Then
iDescTxt.Text = Adodc1.Recordset.Fields(1)
qtyOnHandTxt.Text = Adodc1.Recordset.Fields(2)
Else
iDescTxt.Text = ""
qtyOnHandTxt.Text = ""
End If
Else
iCodeTxt.Text = ""
iDescTxt.Text = ""
qtyOnHandTxt.Text = ""
qtyToAddTxt.Text = ""
End If
End Sub
Private Sub iCodeTxt_Change()
RefreshEntries
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.SetFocus
Text5.Text = Val(Text4.Text) - Val(Text3.Text)
End If
End Sub
Private Sub Timer1_Timer()
Label14 = Date
Label13 = Time
End Sub