#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default web query

oopps, my bad, i missed an ampersand in my code

it works!!


-----Original Message-----
Hi,

I'm trying to run a web query (.iqy) file using an asp
page. I've set up a formula that divides 2 columns and
that works but when I try to include an If statement into
the formula I get an message saying "Cannot download the
information you requested"

My asp code is as follows:

<TABLE border=0
<TR
<TDItem Num</TD
<TDInv Date</TD
<TDSale Amount</TD
<TDQuantity</TD
<TDAmount for Each</TD
<tdYes/No</td
</TR
<% While Not rsSales.EOF
x = x + 1
formula = "=c" & x & "/" & "d" & x
formula2 = "=IF(c" & x "=0,1,2)"

%
<TR
<TD align="left"<%=rsSales("ItemNum")%
</TD

<TD align="center"<%=rsSales("InvDate")%
</TD

<TD<%=rsSales("SaleAmt")%</TD
<TD<%=rsSales("Qty")%</TD
<TD FORMULA="<%=formula%"</TD
<TD FORMULA="<%=formula2%"</TD
</TR
<% rsSales.MoveNext%
<% Wend %
</TABLE

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Importing Data via Web Query - Can values be passed to query? [email protected] Excel Discussion (Misc queries) 5 May 9th 06 06:21 PM
Save data retreived from query without saving query Anthony Excel Discussion (Misc queries) 0 January 25th 06 07:17 PM
Microsoft Query rejects "nz" function in Access Query Vaughan Excel Discussion (Misc queries) 0 May 4th 05 05:20 PM


All times are GMT +1. The time now is 09:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"