I took this code out of another post I found on here, originally 'Comments' was labled 'description'.
So I changed it to the name of my field, and it actually does work, but I just get that darn error each time the page is accessed.
If I try and view the page within access I get the same error like 5 times, so it does sound like it's stuck in a loop.
any ideas how to fix it?
thanks Chris.
PaulD wrote:
[Quoted Text] > my first guess (and I do mean guess) would be you are still in the loop but > el was not set to an object. So, is it possible that sec.type = > c.sectTypeHeader but there is not container named "Comments" so el had > nothing to be assigned to? > > Paul D > > <cdoyle[ at ]oz.net> wrote in message > news:1153149775.994117.298300[ at ]m73g2000cwd.googlegroups.com... > : Hello, > : > : I have a text comment field on my DAP, and I've search this site for > : how to make it grow as needed. > : > : I found this code > : > : <SCRIPT language=vbscript event=DataPageComplete(dscei) for=MSODSC> > : <!-- > : Dim dscconst > : Dim sec > : Dim el > : > : Set c = MSODSC.Constants > : Set sec = dscei.DataPage.FirstSection > : While (not(sec is nothing)) > : If (sec.type = c.sectTypeHeader) Then > : Set el = sec.HTMLContainer.children("Comments") > : sec.HTMLContainer.style.height = el.offsetTop + el.offsetHeight > : + 5 > : End If > : Set sec = sec.NextSibling > : Wend > : --> > : </SCRIPT> > : > : > : > : this seems to work, but I get an error in the browser. The error says > : > : Error: Object required: 'el' > : code 0 > : > : Is there more to this script that I need to add? > : > : thanks > : Chris. > :
|