If else in a dropdownlist

Vadz

New member
Joined
Mar 4, 2013
Messages
2
Programming Experience
Beginner
i have a combo box and a text box in my combo box drop down list(School) i have 3 items ,staff, department and facility..in my text box(Amount) i enter a value when i click on save button it automatically calculate the the value entered in my textbox with the value assign to each school values
example staff =4 department =6 and facility =12..if i select staff and enter 3 my Amount should be =12 which save on my database
i have my code below but it does not display the right result..what wrong with my code

VB.NET:
dim x as integer
 
if Me.SchoolDesc = 'Staff' then
me.amount = Staff * 4
x = Me.Amount

end if
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,602
Location
Sydney, Australia
Programming Experience
10+
I don't see any reference to any ComboBox or TextBox in that code so that could be a clue. What is the value of SchoolDesc? What is the value of Staff? Why are you using single quotes in that If statement?
 
Top Bottom