'----****
'----**** MyBusiness POS V20
'----**** Version del script: 1.0
'----**** 19/02/2020
'----****
Public Sub Main()
Dim cDato
if Parent Is Nothing Then
Exit Sub
end if
cDato = InputBox( "Nueva clave: ", "Clave anterior: " & Mid(Parent.lvListview.SelectedItem.Key,2), "")
if Existe( ( cDato ), "articulo", "prods", Ambiente.Connection ) Then
MsgBox "La clave por que intenta ingresar ya existe", VbInformation
Exit Sub
end if
if Len( cDato ) > 15 Then
MsgBox "La clave debe de ser máximo de 15 caracteres", VbInformation
Exit Sub
end if
cDato = Ucase( cDato )
Ambiente.Connection.Execute "UPDATE componen SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE comppart SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE cotizpar SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE entpart SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE movsvin SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE ordpar SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE partcomp SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE partinv SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE partvta SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE prods SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE salpart SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE series SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Ambiente.Connection.Execute "UPDATE pendient SET articulo = ª" & cDato & "ª WHERE articulo = ª" & Mid( Parent.lvListview.SelectedItem.Key,2) & "ª"
Parent.LlenaProds
End Sub
Relacionado