cosi
datadal = dal.Text
dataAL = al.Text
Adodc1.RecordSource = "select * from percentuali" & " where al between #" & datadal & "#" & " and #" & dataAL & "#"
Adodc1.Refresh
idx = 0
Do While Not Adodc1.Recordset.EOF
If datadal > Adodc1.Recordset.Fields("dal") Then
Label1(idx) = datadal
Else
Label1(idx) = Adodc1.Recordset.Fields("dal")
End If
If dataAL < Adodc1.Recordset.Fields("al") Then
Label1(idx + 1) = dataAL
Else
Label1(idx + 1) = Adodc1.Recordset.Fields("al")
End If
idx = idx + 2
Adodc1.Recordset.MoveNext
Loop

Rispondi quotando