• Sábado 12 de Julio de 2025, 07:48

Mostrar Mensajes

Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.


Temas - Sonia Rodri

Páginas: [1]
1
Visual Basic 6.0 e inferiores / Datareport
« en: Sábado 14 de Febrero de 2004, 13:45 »
Hola

Me estoy volviendo loca con esto. Estoy intentando hacer un informe en mi aplicación, y abro un DataReport, pero no encuentro por ningun lado el DataEnviroment. Ni por Proyect, ni nada.

Es normal?
Puede ser que no lo tenga mi version de V.Basic 6?
Como lo podría añadir?
O si no hay otra manera de hacer funcionar el Datareport sin el Enviroment?

Gracias
Sonia

2
Visual Basic 6.0 e inferiores / Resumir Código
« en: Viernes 9 de Enero de 2004, 13:55 »
Hola, tengo el siguiente código, y me parece excesivamente largo.Se que se puede resumir con matrices, funciones..., pero el caso es que no soy muy experta, y me cuesta mucho, cada vez que genero código.Podrian darme algun consejo, o bien recomendarme algún manual, o tutorial por internet?

Gracias ;-)

Dim A As String
Dim B As String
Dim C As String
Dim D As String
Dim E As String
Dim F As String
Dim G As String
Dim H As String
Dim I As String
Dim J As String
Private Sub text17_lostfocus()
Text17.Text = FormatNumber(Val(Text17.Text), 2, 0, 0, 0)
End Sub
Private Sub text18_lostfocus()
Text18.Text = FormatNumber(Val(Text18.Text), 2, 0, 0, 0)
End Sub
Private Sub text19_lostfocus()
Text19.Text = FormatNumber(Val(Text19.Text), 2, 0, 0, 0)
End Sub
Private Sub text20_lostfocus()
Text20.Text = FormatNumber(Val(Text20.Text), 2, 0, 0, 0)
End Sub
Private Sub text21_lostfocus()
Text21.Text = FormatNumber(Val(Text21.Text), 2, 0, 0, 0)
End Sub
Private Sub text22_lostfocus()
Text22.Text = FormatNumber(Val(Text22.Text), 2, 0, 0, 0)
End Sub
Private Sub text49_Gotfocus()
A = Val(Text17.Text)
B = Val(Text33.Text)
C = A * B
Text49.Text = FormatNumber(C, 2, 0, 0, 0)
D = Val(Text49.Text)
E = Val(Text50.Text)
F = Val(Text51.Text)
G = Val(Text52.Text)
H = Val(Text53.Text)
I = Val(Text54.Text)
J = D + E + F + G + H + I
Text107.Text = FormatNumber(J, 2, 0, 0, 0)
If Val(Text107.Text) > 0 Then
Check7.Value = 1
Else
Check7.Value = 0
End If
End Sub
Private Sub text50_Gotfocus()
A = Val(Text18.Text)
B = Val(Text34.Text)
C = A * B
Text50.Text = FormatNumber(C, 2, 0, 0, 0)
D = Val(Text49.Text)
E = Val(Text50.Text)
F = Val(Text51.Text)
G = Val(Text52.Text)
H = Val(Text53.Text)
I = Val(Text54.Text)
J = D + E + F + G + H + I
Text107.Text = FormatNumber(J, 2, 0, 0, 0)
If Val(Text107.Text) > 0 Then
Check7.Value = 1
Else
Check7.Value = 0
End If
End Sub
Private Sub text51_Gotfocus()
A = Val(Text19.Text)
B = Val(Text35.Text)
C = A * B
Text51.Text = FormatNumber(C, 2, 0, 0, 0)
D = Val(Text49.Text)
E = Val(Text50.Text)
F = Val(Text51.Text)
G = Val(Text52.Text)
H = Val(Text53.Text)
I = Val(Text54.Text)
J = D + E + F + G + H + I
Text107.Text = FormatNumber(J, 2, 0, 0, 0)
If Val(Text107.Text) > 0 Then
Check7.Value = 1
Else
Check7.Value = 0
End If
End Sub
Private Sub text52_Gotfocus()
A = Val(Text20.Text)
B = Val(Text36.Text)
C = A * B
Text52.Text = FormatNumber(C, 2, 0, 0, 0)
D = Val(Text49.Text)
E = Val(Text50.Text)
F = Val(Text51.Text)
G = Val(Text52.Text)
H = Val(Text53.Text)
I = Val(Text54.Text)
J = D + E + F + G + H + I
Text107.Text = FormatNumber(J, 2, 0, 0, 0)
If Val(Text107.Text) > 0 Then
Check7.Value = 1
Else
Check7.Value = 0
End If
End Sub
Private Sub text53_Gotfocus()
A = Val(Text21.Text)
B = Val(Text37.Text)
C = A * B
Text53.Text = FormatNumber(C, 2, 0, 0, 0)
D = Val(Text49.Text)
E = Val(Text50.Text)
F = Val(Text51.Text)
G = Val(Text52.Text)
H = Val(Text53.Text)
I = Val(Text54.Text)
J = D + E + F + G + H + I
Text107.Text = FormatNumber(J, 2, 0, 0, 0)
If Val(Text107.Text) > 0 Then
Check7.Value = 1
Else
Check7.Value = 0
End If
End Sub
Private Sub text54_Gotfocus()
A = Val(Text22.Text)
B = Val(Text38.Text)
C = A * B
Text54.Text = FormatNumber(C, 2, 0, 0, 0)
D = Val(Text49.Text)
E = Val(Text50.Text)
F = Val(Text51.Text)
G = Val(Text52.Text)
H = Val(Text53.Text)
I = Val(Text54.Text)
J = D + E + F + G + H + I
Text107.Text = FormatNumber(J, 2, 0, 0, 0)
If Val(Text107.Text) > 0 Then
Check7.Value = 1
Else
Check7.Value = 0
End If
End Sub

Private Sub text107_Gotfocus()
D = Val(Text49.Text)
E = Val(Text50.Text)
F = Val(Text51.Text)
G = Val(Text52.Text)
H = Val(Text53.Text)
I = Val(Text54.Text)
J = D + E + F + G + H + I
Text107.Text = FormatNumber(J, 2, 0, 0, 0)
If Val(Text107.Text) > 0 Then
Check7.Value = 1
Else
Check7.Value = 0
End If
End Sub

3
Visual Basic 6.0 e inferiores / Datos String
« en: Viernes 26 de Diciembre de 2003, 10:55 »
Esto me funciona:

Data1.Recordset.FindFirst "Contrato='MAD55555'"

y esto, No me funciona:

Data1.Recordset.FindFirst "Contrato='&Text1.Text&'"

Alguien me puede sugerir algo??

Gracias

4
Visual Basic 6.0 e inferiores / Cambiar Registro Con Combo
« en: Martes 16 de Diciembre de 2003, 16:38 »
Hola a todos

Estoy bastante ofuscada tanto con los DataControls, Adodcontrols..., relacionados Con culquier Combo (DBCombo, DataCombo...)

Lo que quiero hacer, que no consigo es Que al elegir un elemento de un Combo, el registro del Datacontrol o adocontrol cambie al elegido.

Gracias a todos

5
Visual Basic 6.0 e inferiores / Problemilla Con Datacombo En Ado
« en: Martes 16 de Diciembre de 2003, 13:45 »
Tengo el siguiente código y me da muchos problemas. Graba registros encima de otros, no me ordena los datos. La verdad es que he mirado el manual 100 vezes, pero me estoy volviendo loca. Una ayudita Pliss!!

Private Sub DataCombo1_Click(Area As Integer)
If DataCombo1.DataChanged Then
Adodc1.Recordset.Bookmark = DataCombo1.SelectedItem
End If
End Sub


Private Sub Toolbar1_ButtonClick(ByVal Button As Button)
Select Case Button.Key
Case "StNuevo"
Adodc1.Recordset.AddNew
Case "StBorrar"
Confirm = MsgBox("¿Estas seguro de Borrar este registro?", vbYesNo, "confirmación de Borrar")
If Confirm = vbYes Then
MsgBox "Registro borrado!", , "Mensaje"
Adodc1.Recordset.Delete
Else
MsgBox "Registro no borrado!", , "Mensaje"
End If
Case "StGuardar"
Confirm = MsgBox("¿Estas seguro de Guardar este registro?", vbYesNo, "confirmación de Guardar")
If Confirm = vbYes Then
MsgBox "Registro guardado!", , "Mensaje"
Adodc1.Recordset.Update
Else
MsgBox "Registro no guardado!", , "Mensaje"
End If
Case "StSalir"
FrmStrobe.Hide
FrmContratos.Show
End Select
End Sub

Páginas: [1]