Professional Documents
Culture Documents
frmmenu.Show
Unload Me
End Sub
Private Sub Command4_Click()
List2.Clear
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.MoveNext
While Not Adodc1.Recordset.EOF
List2.AddItem (Text3)
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveFirst
Command8.Visible = True
List1.Visible = False
List2.Visible = True
Exit Sub
End If
Wend
End Sub
Private Sub Command8_Click()
If List2 <> "" Then
Adodc1.Recordset.MoveFirst
While Not (Adodc1.Recordset.EOF = True)
If List2 = Adodc1.Recordset(1) Then
If Val(Text3) > (0) Then
Command8.Visible = False
Else
Command8.Visible = False
End If
List1.Visible = True
List2.Visible = False
B = InputBox((Text1) + (" ") + (Text2) + (" Precio: $") + (Text3) + (" Cantidad A
Vender?"), "Ingresar Cantidad")
If Val(B) > (0) Then
List1.AddItem (Text1) + (" ") + (Text2)
List1.AddItem ("Precio: $") + (Text3) + (" Cantidad: ") + (B) + (" Subtotal: $") + (Text1)
Adodc1.Recordset.AddNew
Text5 = Text1
Text6 = Text2
Text7 = Val(B)
Text8 = Text3
Text9 = Text4
Adodc1.Recordset.Update
If Val(Text5) > (0) Then
Command8.Visible = False
Else
Command8.Visible = False
End If
End If
Exit Sub
End If
Adodc1.Recordset.MoveNext
Wend
End If
End Sub