Re: PaulD - please help!
- From: PHisaw <PHisaw@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 23 May 2008 10:02:02 -0700
Thanks, Paul for replying and giving such detailed instructions - they are
very helpful. I'm sorry for the confusion. On my first try at this, I
wanted to create a drop-down of vendors in the vendor heading and then a list
of all literature files associated with that vendor with a button labeled pdf
to click to open pdf file.
I couldn't get that to work after figuring it had something to do with
DataPageSize (which you later confirmed), so I decided I would try a
cascading combo box type layout (found the synchronize two drop-down lists
instructions) where I could select vendor from first box and have all related
files listed in second box. Then make selection from second box and have
that single record show in next section of page with pdf button for that one
file and then it should work.
Well, I've devoted another four hours and can now populate boxes with
correct info, but have no idea how to make selection from second box appear
in record listed in the bottom section of page - it lists all records which
would be correct. I'm not sure how to write the "onclick" (I think) code for
the second box to display single record in bottom section.
Again, if you could help with this, I would greatly appreciate it.
Thanks for your time and help.
Phisaw
"PaulD" wrote:
OK, I followed 'ACC2000: How to Synchronize Two Drop-down Lists on a Data.
Access Page' and was able to get it to work by stopping at step 15.
1. Opened my database (don't have Northwind installed on my computer)
2. - 4. followed ms webpage
5. made a drop down based on my ProjectType table
6. included the fields ptKey and ptDescription
7. changed ID property of drop down control to ddlType
I also verified the following properties
ListBoundField = ptKey
ListDisplayField = ptDescription
ListRowSource = Recordset: ProjectType
8. created a second drop down based on my Project table
9. included the field projDescription
10. changed the ID property to ddlProject
The ListBoundField of this control will contain the values used, this
may or may not be the same as ListDisplayField. In my case they were both
set to the same.
11. opened the script editor
12. browsed to the onchange event of the ddlType control
13. added the following script for the event
MSODSC.RecordsetDefs.Item("Project").ServerFilter = "[prjProjectType]="
& ddlType.value
Note here that ddlType.value is an integer so I did not need single quotes
around the filter
14. in script outline pane, browsed to the onload event of the window
control
15. added the following script for the event
ddlType.value = ""
Saved it and tested to verify it worked on my computer
Paul D
"PHisaw" <PHisaw@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:59B32FBE-F145-40B3-93BD-3EFC286EB520@xxxxxxxxxxxxxxxx
: Thanks, Paul for replying. Well, I now know why it doesn't work for more
: than one record. This is so simple to create in a regular Access form,
but
: not in a DAP. I just need a list of vendors, a list of literature for
: selected vendor, and then a record for selected literature. So simple -
but
: so difficult.
:
: I took out the MSODSC.RecordsetDef lines, but it still didn't work and I
: even replaced the subareas with the table name for the first drop down and
: both times received error - invalid or unqualified reference.
:
: Do you have any other suggestions that I can try to get the end result I'm
: looking for without having to learn to create a web page as I only need
this
: one?
:
: Thanks again for your time and help.
: PHisaw
:
: "PaulD" wrote:
:
: > 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@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
: > news:526AA622-8A79-480A-952D-EC89BA7D4A09@xxxxxxxxxxxxxxxx
: > : 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 support 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
support
: > 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
: >
: >
: >
- References:
- Re: PaulD - please help!
- From: PaulD
- Re: PaulD - please help!
- From: PHisaw
- Re: PaulD - please help!
- From: PaulD
- Re: PaulD - please help!
- Prev by Date: Is it possible to determine the button clicked on the Navigation control in a DAP?
- Next by Date: hfdhhhhhhhhhhhh
- Previous by thread: Re: PaulD - please help!
- Next by thread: Is it possible to determine the button clicked on the Navigation control in a DAP?
- Index(es):