oli375
Messages postés10Date d'inscriptionlundi 8 mars 2004StatutMembreDernière intervention12 mars 2006
-
16 mars 2004 à 12:09
crenaud76
Messages postés4172Date d'inscriptionmercredi 30 juillet 2003StatutMembreDernière intervention 9 juin 2006
-
16 mars 2004 à 14:06
voula dans mon code vb j'ai crée de groupe de bouton différent , un qui s'appel ordres et un autre mode
avec 2 choix possible pour chacun.
le problème et que quand je lance mon programme vb fait comme si il n'y avait que un groupe de bouton avec quatre choix possible et don c kje ne peux en cocher un seul
voici le code
Dim rs As Recordset
Dim req As String
Dim initial As String
Dim appel As ListItem
Set db = New Connection
connect = "dsn=appels;uid=root;pwd"
Call db.Open(connect)If ordres(0).Value True Or ordres(1).Value True Then
req = "select num_appel, rs, date, heure, num_inter from personnel p, appel a, societe s, interlocuteur where a.num_societe=s.numsociete and p.initialp=a.initialp and i.num_inter=a.num_inter"
If mode(1).Value = True Then
req = "select initialp from personnel where nomp='" & nom.Text & "'"
Set rs = New Recordset
Call rs.Open(req, db, adOpenForwardOnly, adLockReadOnly)
If Not rs.EOF Then
rs.MoveFirst
initial = rs!initialp
req = req & " and a.initialp='" & initial & "'"
rs.Close
Set rs = Nothing
End If
If ordres(0).Value = True Then
req = req & "order by rs"
Else
req = req & "and date between '" & datdeb.Text & "' and '" & datfin.Text & "' order by date"
End If
Set rs = New Recordset
Call rs.Open(req, db, adOpenForwardOnly, adLockReadOnly)
lstappel.ListItems.Clear
If Not rs.EOF Then
rs.MoveFirst
Do
Set appel = lstappel.ListItems.Add
appel.Text = rs!num_appel
appel.SubItems(1) = rs!Date
appel.SubItems(2) = rs!heure
appel.SubItems(3) = rs!rs
appel.SubItems(4) = rs!num_inter
rs.MoveNext
Loop Until rs.EOF
Else
rep = MsgBox("il n'y a aucun appel ", vbInformation)
End If
rs.Close
Set rs = Nothing
Else
rep = MsgBox("dans quel ordre voulez-vous trier ?", vbInformation)
End If
db.Close
Set db = Nothing