Data access page question--populating a field in the caption section

D

drm1

I have a data access page problem that probably has a simple solution,
if someone can navigate around my ignorance.

I have a banded data access page; the recordset is a query with a
server filter. It works fine.

The page has a caption section containing column headings, but I also
need to put some values into the caption on the basis of a field in the
records. (Same value in each filtered record, as it happens.)

I know that I cannot bind a control in the caption section, so have
placed unbound text boxes, and want to use code (vbscript) to populate
them. I do this in the onload event of the window.

This works if I try to put constants in (Controlname.value =
"blahblah"), so I know the event is firing and that I am referring to
the correct control.

But I do not know how to refer to values in the recordset from the
caption section. I know that this data is reachable only if used in the
main section ("header"), so have a hidden text box in the header
section with the value I need.

But how to refer to it? Is the header a child (below) of the caption
section?

The multiple bands make the value an array, so do I need something like
Controlname(0).value to get the value from the first band? This does
not seem to work, making me think I am not correctly referring to this
control in the header section.

I've tried various things and have not had any luck, so there's clearly
something (many things) I don't understand about the MSODSC. Can anyone
straighten me out?

Thanks.
 

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