DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   VB.NET (http://www.daniweb.com/forums/forum58.html)
-   -   End of Statement Expected (http://www.daniweb.com/forums/thread145163.html)

tyserman5674 Sep 10th, 2008 10:26 pm
End of Statement Expected
 
I am getting an error with this statement and can not seem to figure out what is wrong.
decMortgagePayment.ToString("C") & " Monthly Payment" = Me.lblMortgagePayment.Text
I am doing a calculation and want to put the results of the calculation in lblMortgagePayment. I get the error for this line, end of statement expected.
Help please,
Ken

waynespangler Sep 11th, 2008 3:47 am
Re: End of Statement Expected
 
The two lines have to be on the same line.

Mr Brownstone Sep 11th, 2008 6:12 am
Re: End of Statement Expected
 
First off, it's on the same line. but Try this:

Me.lblMortgagePayment.Text = (decMortgagePayment) & " Monthly Payment "

I am not too sure that is 100% correct because I am work but you got it the wrong way round.

Jx_Man Sep 11th, 2008 12:03 pm
Re: End of Statement Expected
 
>> I am doing a calculation and want to put the results of the calculation in lblMortgagePayment
you want to put the result in lblMortgagePayment, but you put wrong assignment in your code.
Mr Brownstone was give the answer.


All times are GMT -4. The time now is 5:51 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC