I am trying to get some values that have been stored in variables to add togeather.
I have a form that calculates a total for the person before adding their personal details to a access DB.
The total for the person is added to the grand total and the form is reset (not reloaded), then the process begins again and we get a new total for person.
The bit that I can not get to work is the adding of both totals together, what I need is:
Grand total + person total = new grand total
What I get is:
Grand total + person total = person total
The code is below,
Any ideas?
I have a form that calculates a total for the person before adding their personal details to a access DB.
The total for the person is added to the grand total and the form is reset (not reloaded), then the process begins again and we get a new total for person.
The bit that I can not get to work is the adding of both totals together, what I need is:
Grand total + person total = new grand total
What I get is:
Grand total + person total = person total
The code is below,
Any ideas?
VB.NET:
Dim runningtotalofbooking As Decimal
Dim holidaycost As Decimal
Dim activitycost As Decimal
Dim totaloftraveler As Decimal
totaloftraveler = holidaycost + activitycost
MsgBox("Traveler Cost: £ " & totaloftraveler)
runningtotalofbooking = totaloftraveler + runningtotalofbooking
MsgBox("Running Cost: £ " & runningtotalofbooking)