View Full Version : Create a report based on a query


aman
05-05-2009, 07:33 AM
Hi guys

I want to view report on screen using sql statement. Could anyone please tell me hows it possible.
I am using the following query:


strsql = "SELECT date1,barcodevalue,location,department FROM rebookinfo order by barcodevalue"


How can I display its result in a report?

Thanks in advance!

Regards
AMan

pbaldy
05-05-2009, 07:50 AM
Create a report with that query as its source, then open it with

DoCmd.OpenReport...

aman
05-05-2009, 07:54 AM
Hi Pbadly

Thanks for your reply... But As I am new in Access/vba so really don't know how to do that. Can you please send me code for this.

Regards
Aman

pbaldy
05-05-2009, 08:16 AM
Code to do what? I gave you the code to open the report. You don't build it with code. Try the report wizard.