# Miscellaneous > SQL Scripts >  SQL with VB report

## WAKERS

I have a pupil who would like to create a report using the report using the Data Environment in VB. However he would like his clients to be able to search for data by using a date which will need to be input via the user interface on opening the report. The report will need to be created using SQL but although we have tried several options I have been unable to create the query without using specific dates within the coding. Possible coding could be SELECT ..... FROM .... HAVING .... (This is where I need the SQL to read the date from the users input!!)

----------


## sainswor99

Could you post a complete SQL statement (including the hardcoded dates) that does work?  That would help in debugging a bit.

Stu

----------


## WAKERS

coding which has been used thus far is ... SELECT .... From..... WHERE  tbl..DateofGame = tblSer.Search. The last two parts of the SQL were created in a similar to an Access query - ie in Access you can create a parameter search within a query to print out the required info and then use this query to create a report. We are trying to do the same thing with VB but only  using the data environment to create the report instead of the coding VB to print the report.

----------

