Visual Basic - Dtpicker y option buton

Life is soft - evento anual de software empresarial
 
Vista:
sin imagen de perfil

Dtpicker y option buton

Publicado por Israel (2 intervenciones) el 01/10/2008 21:36:42
Estoy haciendo un sistema para una escuela y lo que quiero que al hacer las consultas mediante
2 detepicker muetre si el alumno ya pago o tiene algun adeudo.
Y lo que pasa que me muestra en el MSHFlexGrid1 la informacion pero me muestra la informacion en general.
Y lo que quiero que mediante 2 option. optiadeudos y optiingresos me muestre por separado los reportes
de los deudores y los que han pagado su colegiatura.
Este es mi codigo si alguein me pudiera ayudar se los agradeceria
Option Explicit
Private Sub cmdall_Click()

query ("select * from USAS")

If deparam.rscmdparam.State = adStateOpen Then
deparam.rscmdparam.Close
End If

deparam.cmdparam CDate("21/08/1994"), CDate("01/01/2100")

Load rptparam
rptparam.Show
End Sub

Private Sub cmdprint_Click()
On Error GoTo trap

If deparam.rscmdparam.State = adStateOpen Then
deparam.rscmdparam.Close
End If
deparam.cmdparam DTPicker1.Value, DTPicker2.Value
Load rptparam
rptparam.Show
trap:
Exit Sub
End Sub

Private Sub DTPicker1_Change()
query ("select * from PAGOS where [FECHA DE PAGO] between #" & DTPicker1.Value & "# and #" & DTPicker2.Value & "#")
End Sub

Private Sub DTPicker2_Change()
query ("select * from PAGOS where [FECHA DE PAGO] between #" & DTPicker1.Value & "# and #" & DTPicker2.Value & "#")
End Sub

Private Sub Form_Activate()

query ("select * from PAGOS")

End Sub

Private Sub Form_Load()
Move (Screen.Width - Width) 2, (Screen.Height - Height) 2
Set cn = New Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;User ID=Admin;Data Source=" & App.Path & "USAS.mdb;Mode=Share Deny None;Extended Properties=';COUNTRY=0;CP=1252;LANGID=0x0409';Jet OLEDB:System database='';Jet OLEDB:Registry Path='';Jet OLEDB:Database Password='';Jet OLEDB:Global Partial Bulk Ops=2"
End Sub

Private Sub Form_Unload(Cancel As Integer)
rs.Close
cn.Close
End Sub

Private Sub query(sql1 As String)
Set rs = New Recordset
rs.CursorLocation = adUseClient
rs.Open sql1, cn, adOpenForwardOnly, adLockReadOnly
Set MSHFlexGrid1.DataSource = rs
MSHFlexGrid1.Refresh
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder