|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Cannot use parentheses when calling a SubHi,
I have a function on a page: Function DisplayRelevantTable(val1,val2) 'do something End Function and am calling this via: <% DisplayRelevantTable(Recordset1.Fields.Item("DateDraft").Value,Recordset1.Fields.Item("DateDraftlSent").Value)%> What am I doing wrong?
Show quote
Hide quote
"Excel User" <eu***@microsoft.com> wrote: It's a VB thing that's also in VBA and VBScript. When you call a>Hi, > >I have a function on a page: > >Function DisplayRelevantTable(val1,val2) > > 'do something > >End Function > > >and am calling this via: > ><% >DisplayRelevantTable(Recordset1.Fields.Item("DateDraft").Value,Recordset1.Fields.Item("DateDraftlSent").Value)%> function and don't retrieve the value, or if you call a function that has no return value, you cannot use parentheses. When you do catch the value, you MUST use parentheses. So: <% DisplayRelevantTable Recordset1.Fields.Item("DateDraft").Value, Recordset1.Fields.Item("DateDraftlSent").Value %> works. Excel wrote on Fri, 26 Jun 2009 20:42:06 +0100:
Show quoteHide quote > Hi, Tim has already provided a workaround, here's another:> I have a function on a page: > Function DisplayRelevantTable(val1,val2) > 'do something > End Function > and am calling this via: > <% DisplayRelevantTable(Recordset1.Fields.Item("DateDraft").Value, > Recordset1.Fields.Item("DateDraftlSent").Value)%> > What am I doing wrong? Call DisplayRelevantTable(Recordset1.Fields.Item("DateDraft").Value, Recordset1.Fields.Item("DateDraftlSent").Value) and another vdummy = DisplayRelevantTable(Recordset1.Fields.Item("DateDraft").Value, Recordset1.Fields.Item("DateDraftlSent").Value) in the latter case the assignment of the output of the function (which is empty assuming that you don't set it in the function call) is assigned to a variable that isn't used for anything else. -- Dan
Large row count from stored procedure
Urgent: getting recordcount after running Stored Procedure LEFT JOIN problem How can I type in the combo box <select> ? How to change all relative paths in a website??? What is the real IP address of the site visitor? Pinpoint unspecified error for objXMLHttp.send objXML statement Classic ASP, <SELECT> postback, Browser Navigation Microsoft OLE DB Provider for ODBC Drivers error '80004005' Script from variables |
|||||||||||||||||||||||