To answer your first question, once you change your DAP to show more than 1
record (let's say 10), it does not know how to find itemnumber.value since
there are now 10 itemnumber fields and therefore 10 itemnumber.values.
Basically you have created a banded web page, and this requires a very
different approach to retrieving data. On a banded web page, each band is
section of fields containing data. Here is some sample code from one of my
banded pages
<SCRIPT language=vbscript event=onmouseover for=Contact>
<!--
dim who
dim ContactEmail
dim ContactMobile
set who = window.event.srcElement
ContactEmail =
msodsc.GetContainingSection(who).HTMLContainer.children("Email").Value
ContactMobile =
msodsc.GetContainingSection(who).HTMLContainer.children("Mobile").Value
If ContactEmail <> "" then
If ContactMobile = "" then
who.title = ContactEmail
else
who.title = ContactEmail & chr(13) & ContactMobile
end if
Else
If ContactMobile <> "" then who.title = ContactMobile
end if
-->
</SCRIPT>
As you can see, this fires on the mouseover event for the contact field on
my DAP. I have a banded DAP showing all my records (usually around 50 at
a
time), with one of the visible fields being a contact name for the
project.
The key to making this work for the correct field is the line
set who = window.event.srcElement
When you click a field, this will set the object 'who' to the field you
selected. If you then want the value of that field just use who.value
instead of itemnumber.value
As for your second question I'm not real sure.
MSODSC.RecordsetDefs.Item("SubAreas").ServerFilter = ""
The intent of this line would be to set a ServerFilter for a recordset to
blank (i.e. no filter). Usually you would use your recordset name where
"SubAreas" is. It appears SubAreas is intended to be some sort of
recordset
native or built into MSODSC. I've not really looked into this so can't
answer the question. Have you tried commenting out or erasing those lines
and see if the rest works?
Paul D
"PHisaw" <PHisaw@[EMAIL PROTECTED]
> wrote in message
news:526AA622-8A79-480A-952D-EC89BA7D4A09@[EMAIL PROTECTED]
PaulD,
:
: I read that you still check in to this newsgroup and you've recently
given
: me some help with a DAP - question was "OnClick Help from 4/29/08. I
changed
: my page to an hta and have made some progress, though not completely as
I
: want it to. I have the command button working to open pdf listed in
field
: "ItemNumber". If it is set up with one record showing, it works fine.
If
I
: set it up to have a list of records showing, it doesn't work - error msg
: "object doesn't sup****t this property or method: itemnumber.value".
:
: I've narrowed it down to the data page size grouping code for the second
: group. The page was created with -1, if I change it to one and show
only
one
: record it will work, but if I change it to 10, I get the object sup****t
error
: message.
:
: <a:GroupLevel>
: <a:RecordSource>qLiteratureSearch</a:RecordSource>
:
: <a:DefaultSort>[cabinet number]</a:DefaultSort>
:
: <a:HeaderElementId>HeaderqLiteratureSearch</a:HeaderElementId>
: <a:FooterElementId></a:FooterElementId>
:
: <a:CaptionElementId>CaptionqLiteratureSearch</a:CaptionElementId>
:
:
<a:RecordNavigationElementId>NavigationqLiteratureSearch</a:RecordNavigationElementId>
:
: <a:DataPageSize>-1</a:DataPageSize>
:
: <a:GroupFilterControl></a:GroupFilterControl>
: </a:GroupLevel>
:
:
: My page has a list box in the first section listing vendors and the
second
: section lists each piece of literature for selected vendor.
:
: If you could help with this, I would greatly appreciate it. I have
spent
a
: considerable amount of time with this and have come to a point where I
can
do
: no more. I've even tried to set up two synchronized list boxes per
: instructions give in Microsoft Article 232592 and then return only one
record
: with pdf button to work, but I can't get those to work either. It
errors
on
: step 17 code "MSODSC.RecordsetDefs.Item("SubAreas".ServerFilter = "" I
: receive error "SubAreas" object cannot be found". I've web searched for
: solution, but haven't found anything.
:
: Thanks in advance,
: Phisaw


|