By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 1,205 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

Accessing Fields without Controls in Reports

P: 12
This question got lost on the bottom of another thread. Is it the case that you can't access specific fields of a record set without placing a control that's linked to that record on the report?

I have a number of fields within a database that I want to use to drive some logic within an event. I don't, however, want to drop every field returned by the database into hidden controls on the report.

There must be a more elegant way to to do this, right?

Isn't there some object that contains the current record's data that can be access from within VB?
Nov 12 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 2.5K+
P: 2,545
Hi. I have not found any way to access the underlying fields of a report's recordset in code. If it was a form it would be possible using the Recordsetclone method, but this method is not available in the report object. The Recordset property of the report object does not allow access to the underlying fields either.

Even if it was possible to access the recordset, this would not necessarily be a solution for you - as you would need to be accessing the same record as the report is processing at the time.

As the report's controls collection can be accessed without difficulty I can see no other way to access the underlying values than by placing a hidden control onto the report. I have not found any alternative in testing this out so far and in looking at the object model for the Access Report object.

Nov 16 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.