
02/05/2007, 00:44
|
| | Fecha de Ingreso: marzo-2007
Mensajes: 53
Antigüedad: 18 años, 1 mes Puntos: 0 | |
cuantas consultas puedo hacer en el mismo formulario? haber si alguien me puede ayudar..
si yo tengo este codigo...
''¡¡¡¡¡¡¡¡¡ esta consulta la mando al datagrid ,
Set MiRecordSet = New ADODB.Recordset
MiRecordSet.Open "select piezas, producto2,total from notas_detalle where notas_detalle.notanumero = 0 ", MiConexion, adOpenDynamic, adLockOptimistic Set DataGrid1.DataSource = MiRecordSet
'¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ ESTA ES LA SEGUNDA CONSULTA, LA HAGO PARA PODER LLENAR UN DATACOMBO CON EL NUMERO TOTAL DE NOTAS '''DE 1 A N NOTAS
Set MiRecordSet = New ADODB.Recordset
MiConexion.CursorLocation = adUseClient
MiRecordSet.Open "select *from notas order by notas", MiConexion, adOpenDynamic, adLockOptimistic
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Ruta & ";Persist Security Info=False"
Adodc1.CommandType = 8
Adodc1.RecordSource = "select * from notas order by notas"
Adodc1.Refresh AQUI LLENO EL DATA COMBO TOMANDO DE REFERENCIA LA SEGUNDA CONSULTA QUE HICE.....
With Adodc1
Do
Combo1.AddItem .Recordset.Fields(0)
.Recordset.MoveNext
Loop Until .Recordset.EOF
End With AQUI SE ME OCURRIO, NO SE SI SE PUEDA,.. REALIZAR OTRA CONSULTA PARA PODER SUMAR EL CAMPO LOCALIZADO "TOTAL" DE LA PRIMER CONSULTA PARA PODERLO PLASMAR EN UN LABEL..
SE PUEDE HACER ESO?????
SI ES POSIBLE COMO LO HARIA...
ESPERO ME SAQUEN DE MI DUDA.. GRACIAS..
SI ESTOY MAL EN ESTE CODIGO .. ALGO QUE ESTE DE MAS ME PODRIAN DECIR
'MiRecordSet = New ADODB.Recordset
' MiConexion.CursorLocation = adUseClient
' MiRecordSet.Open "select......" |