Using code to display data in Report

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
 
J

Jeff Boyce

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
 
A

Anita Tadhani

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.
 
A

Anita Tadhani

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.
 
J

Jeff Boyce

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top