My problem is that, when I see the transaction of November,it shows exactly,but when I want to to see the other month (which month has nt transacted) its shows the previous data,ie November month..
Source code :
i have declaired in module......Global con as new ADODB.connection
General declairation------
Dim data1 As New ADODB.Command
Dim rs As New ADODB.Recordset
Dim subs As String
Dim subs1 As String
clik a command button()
On Error Resume Next
data1.ActiveConnection = con
data1.CommandText = "select sum(amunt) from amn where mon & yr & schm='" & (Combo1.Text) & "' & '" & (Text1.Text) & "'& '" & (Combo2.Text) & "'"
rs.Open data1, , adOpenDynamic, adLockReadOnly
If Not rs.EOF Then
subs = rs.Fields(0) /data field
subs = rs.Fields(1) / ''
subs = rs.Fields(2)
subs = rs.Fields(3)
Label9.Caption = subs
End If
rs.Close
Plz help me....