HELP: How do I fill two or more lables using an IF THEN statement

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Hello, I would like to fill more than one lable with info in an IF then
statement.

I know I can do this.

If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal)
end if


what if I have both lblsubtotal and lblfinaltotal.....how would also
populate lblfinaltotal.text with the mdecPizzatotal within that if than
statement?

I tried this, but got errors...

If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal) And lblFinaltotal.text =
FormatCurrency(mdecPizzatotal)
end if

thank for any help.
 
The easiest way seems to be just get rid of the "and" and make two seperate
statements, No?

If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal) lblFinaltotal.text
=FormatCurrency(mdecPizzatotal)
end if

Or how about:
If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal) lblFinaltotal.text
=lblsubtotal.text
end if


--

/ Sean Mc /
Replace the "wish" with the screen name to contact.

"I have not failed. I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)
 
Hello, I would like to fill more than one lable with info in an IF then
statement.

I know I can do this.

If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal)
end if


what if I have both lblsubtotal and lblfinaltotal.....how would also
populate lblfinaltotal.text with the mdecPizzatotal within that if than
statement?

I tried this, but got errors...

If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal) And lblFinaltotal.text =
FormatCurrency(mdecPizzatotal)
end if

thank for any help.

Like this:

If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal)
lblFinaltotal.text = FormatCurrency(mdecPizzatotal)
End If

// CHRIS
 
Hi there,
If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal) lblFinaltotal.text
=FormatCurrency(mdecPizzatotal)
end if

Or how about:
If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal) lblFinaltotal.text
=lblsubtotal.text
end if

? You sure earnt your name!

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
Jason said:
I would like to fill more than one lable with info in an IF then
statement.

I know I can do this.

If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal)
end if


what if I have both lblsubtotal and lblfinaltotal.....how would also
populate lblfinaltotal.text with the mdecPizzatotal within that if than
statement?

I tried this, but got errors...

If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal) And lblFinaltotal.text =
FormatCurrency(mdecPizzatotal)
end if

\\\
If radPizza.Checked Then
lblSubTotal.Text = ...
lblFinalTotal.Text = ...
End If
///
 
What-a-Tool said:
The easiest way seems to be just get rid of the "and" and make two seperate
statements, No?

If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal) lblFinaltotal.text
=FormatCurrency(mdecPizzatotal)
end if

Or how about:
If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal) lblFinaltotal.text
=lblsubtotal.text
end if

The statements must be separated with a newline or ":".
 
Sorry - Didn't check my text after post -
when I sent it they were all on seperate lines as they should have been.
They weren't posted that way, though
If radPizza.checked = true then

lblsubtotal.text = FormatCurrency(mdecPizzatotal)

lblFinaltotal.text=FormatCurrency(mdecPizzatotal)

end if
Or how about:If radPizza.checked = true then

lblsubtotal.text = FormatCurrency(mdecPizzatotal)

lblFinaltotal.text=lblsubtotal.text

end if
This is what I thought I sent

--

/ Sean Mc /
Replace the "wish" with the screen name to contact.

"I have not failed. I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)
 
"Herfried K. Wagner
\\\
If radPizza.Checked Then
lblSubTotal.Text = ...
lblFinalTotal.Text = ...
End If
Better is the solution from What-a-tool
If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal)
lblFinaltotal.text=lblsubtotal.text
end if
Although it is very very very very slight
:-)))))))))))))
Cor
 
Awww - Jeeez!!
I finally saw a problem that was basic enough for me to reply to and I
F**ked it up. It was that freekin'
poltergeist that lives in my keyboard!
Yeah - Yeah! Thats what it was!
What - a Freakin Tool!!

--

/ Sean Mc /
Replace the "wish" with the screen name to contact.

"I have not failed. I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)
 
Cor said:
Better is the solution from What-a-tool
If radPizza.checked = true then
lblsubtotal.text = FormatCurrency(mdecPizzatotal)
lblFinaltotal.text=lblsubtotal.text
end if
Although it is very very very very slight

Ah, I missed that both labels should be filled with the same value...
 
Hi What-a-Tool,

ROFL.

Never mind - "You have not failed. You've just found 1 way that didn't
work."

Condolences and/or congratulations,
Fergus
 
What-a-Tool said:
Sorry - Didn't check my text after post -
when I sent it they were all on seperate lines as they should have been.
They weren't posted that way, though

If radPizza.checked = true then

lblsubtotal.text = FormatCurrency(mdecPizzatotal)

lblFinaltotal.text=FormatCurrency(mdecPizzatotal)

end if

Ah yes, thats what I did, great, it worked, thanks.
 
Back
Top