Variable displays at one part while does not in another part in a

J

Jack

Hi,
I got a asp page where a variable BudgetTotal is calculated as below:

BudgetTotal = (rstemp.Fields("FedBudget") + rstemp.Fields("StateBudget") +
rstemp.Fields("LocalBudget"))

Initially, when I check this variable value, it displays according to
the following command.
Response.Write "Total Budget" & "<br>"
Response.Write BudgetTotal & "<br>"
Response.Write "End" & "<br>"
However, this variable when used as a part of a table, does not display the
value. No idea why that would be.
The following is part of the code where the variable is used in a table:
Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" & FormatCurrency(BudgetTotal)
& "</TD>" & vbCRLF

Any help is appreciated in advance. Thanks.
 
B

Bob Barrows [MVP]

Jack said:
Hi,
I got a asp page where a variable BudgetTotal is calculated as below:

BudgetTotal = (rstemp.Fields("FedBudget") +
rstemp.Fields("StateBudget") + rstemp.Fields("LocalBudget"))

Initially, when I check this variable value, it displays according to
the following command.
Response.Write "Total Budget" & "<br>"
Response.Write BudgetTotal & "<br>"
Response.Write "End" & "<br>"
However, this variable when used as a part of a table, does not
display the value. No idea why that would be.
The following is part of the code where the variable is used in a
table: Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
FormatCurrency(BudgetTotal) & "</TD>" & vbCRLF

Any help is appreciated in advance. Thanks.

Sorry, we're not clairvoyant. Create a small test page that demonstrates
this problem and show the code to us (perhaps the exercise of creating the
small page will help you spot the problem yourself).

Bob Barrows
 
J

Jack

Thanks Mark and Bob for your respective advise.

Here is the view source output for the budget line, Mark:
&nbsp</TD><TD WIDTH='1%' >&nbsp</TD><TD WIDTH='10%'
ALIGN=RIGHT><B>BUDGET:</B></TD><TD ALIGN=RIGHT WIDTH='10%' >$0.00</TD>
The above stillshows the BUDGET as $0.00. Any further thoughts. Regards.
 
J

Jack

Bob,
I am going to work on creating a small test page to see if I can find out
where the problem is. In case I still have no clue, I will further post. In
any event I appreciate your advise. Regards.
 
M

Mark Schupp

I think you will need to look at all of the code between the point where you
can get the value and where you cannot.

Gradually move your debugging display code down the page until it no longer
shows the expected value.

Also:

Does it display if it is not formatted using FormatCurrency?
Do you have "implicit none" at the top of the page?
 
M

McKirahan

Mark Schupp said:
I think you will need to look at all of the code between the point where you
can get the value and where you cannot.

Gradually move your debugging display code down the page until it no longer
shows the expected value.

Also:

Does it display if it is not formatted using FormatCurrency?
Do you have "implicit none" at the top of the page?

[snip]

Do you mean "Option Explicit"?

I've never heard of "implicit none".
 
M

Mark Schupp

You're right. "Option Explicit" is what I meant.

"implicit none" is from Fortran (that was a looooong time ago for me).
memory is a strange thing sometimes.

--
Mark Schupp



McKirahan said:
Mark Schupp said:
I think you will need to look at all of the code between the point where you
can get the value and where you cannot.

Gradually move your debugging display code down the page until it no longer
shows the expected value.

Also:

Does it display if it is not formatted using FormatCurrency?
Do you have "implicit none" at the top of the page?

[snip]

Do you mean "Option Explicit"?

I've never heard of "implicit none".
 
J

Jack

Thanks Mark for following up with this issue. I actually checked the value of
FormatCurrency(BudgetTotal) and it too gives me the correct value when I do a
response.write on the above. I will follow your and Bob's advise and see if I
could resolve this problem. Sorry for the late response. Had to handle other
IT issues. Regards.

Mark Schupp said:
You're right. "Option Explicit" is what I meant.

"implicit none" is from Fortran (that was a looooong time ago for me).
memory is a strange thing sometimes.

--
Mark Schupp



McKirahan said:
Mark Schupp said:
I think you will need to look at all of the code between the point where you
can get the value and where you cannot.

Gradually move your debugging display code down the page until it no longer
shows the expected value.

Also:

Does it display if it is not formatted using FormatCurrency?
Do you have "implicit none" at the top of the page?

[snip]

Do you mean "Option Explicit"?

I've never heard of "implicit none".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top