No value proprety in report..

N

Nick I

I'm very confused. I have a report which I am populating textboxes from a
bunch of different queries.

To do this, I want to use VBA and populate textboxes by looping through
recordsets. When I go to set the value of textboxes however, VBA does not
give me the option to set .Value like I'm used to. I put text1.value =
rst.fields(1) anyways and nothing pops up.

How do I set the value of an unbound text box when I open a report in VBA???
 
D

Duane Hookom

Good luck trying to use a recordset to populate report controls. When you
state "nothing pops up" I assume you mean the intellisense. The "Value"
property of a text box is the default property. Also, it seems many
properties don't display in intellisense but they are still there and
available.
 
N

Nick I

Yeah, I meant intellisense. Nothing shows up on the report view when I set
..Value anyways.

How else would you suggest displaying values from about 8 different queries
on a report? I can only set one query as the controlsource. The rest of the
textboxes I could use DCount/DLookup functions, but that also makes the
report take 10 years to run.
 
D

Duane Hookom

That's why I said "good luck". DCount() and DLookup() are horribly slow.
Your code to set values of text boxes should be run in the On Format event
of the section containing the text boxes.

We don't know much about the design of your report and queries so it is
difficult to suggest an alternative. Normally subreports and/or fancy SQL or
expressions can replace all code and domain aggregate functions.
 

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