I'm using VB6 as my frontend and MSACCESS as backend.
I have a field in tblHistory named "payperiod". I have put text in this field.
content of payperiod: JANUARY 1 - 15, 2006
JANUARY 16 - 31, 2006
FEBRUARY 1 - 15, 2006
FEBRUARY 16 - 28, 2006 and so on.
i have a SSTAB1 with 12 Tabs. each tab has a datagrid. Tab1.Caption = "January", Tab2.Caption = "February" Tab3.Caption = "March", until Tab12 = "December".
Now i want to get the report using Crystal Report for month based on SSTAB1.CAPTION.
here is my code: this will filter only the Month
Private Sub SSTab1_Click(PreviousTab As Integer)
AdoHistory.CommandType = adCmdText
AdoHistory.RecordSource = "select * from tblHistory where payperiod like '" & SSTab1.Caption & "%'"
AdoHistory.Refresh
End Sub
thanks in advance...