[Originally posted by ifah]

hi;

i have 1 combo box here which list type of book : Education, Horror,
Romance and Kids.

i also have 2 DateTimePicker here.

My question here is how to generate a report that will show data when
i choose 'Horror' from Combo1 and the data is between the 2 DateTimePicker.

example ( user put this in his combo box and DTPickers):

Combo1.Text = 'Horror'
DTPicker1.Value = 01/09/20001
DTPicker2.Value = 05/09/2001


i done this in:
----------------------
Command1_Click

Dim strSQL as string
strSQL = "SELECT * FROM tblMyBooks WHERE BookType=''" & Combo1.Text & "'' AND (BookDate Between #" & DTPicker1.Value & "# AND #" & DTPicker2.Value & "#);"

End Sub
--------------------
Command2_Click

Me.Hide
DataReport1.Show

End Sub

-------------


the problem is, the report show all data from the table. the report did not show data
that i want like in my strSQL.

is there anything wrong here?

could anybody please tell me why?

thanks in advance!!