Using code to display data in Report

  • Thread starter Thread starter Anita Tadhani
  • Start date Start date
A

Anita Tadhani

I want to generate report using query.
My query is simple
"Select GMTDateTime, ConvertToLocal(GMTDateTime) as LocalDateTime from
tbDateTime"
How can I write code in VBA to generate Report?

Thanks
 
Anita

Is there a reason you need to do this in code? Is the UI available?

It would be a simple matter to highlight the query, click the "New" toolbar
button drop-down, and select "Report".

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Yeah, Since I use convertToLocal module in my query, I want to test
performance that how it makes a difference if I populate all the records
through coding?

I have thousands of records in my table.

I know using UI is faster, But I want to measure the difference.
 
Please help me.

Anita Tadhani said:
Yeah, Since I use convertToLocal module in my query, I want to test
performance that how it makes a difference if I populate all the records
through coding?

I have thousands of records in my table.

I know using UI is faster, But I want to measure the difference.
 
I asked about the UI because that's what I use. I don't have any experience
to draw on using VBA to do this.

I will point out that iterating through the records using VBA is MUCH slower
(usually) than using set-oriented queries to retrieve the recordset you'd
use for the report.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top