I am new to vb and I have been working on getting my brain around this if condition problem I am having in a windows forms in VB. This part of the project is a form writing back to SQL. I am looking to valdate input in textboxAm before I write the data back to the database:
I have combobox1 that has 3 outcomes: monday / friday / saturday
'if monday is chosen then the value in textboxAm can only be 8-12
'if friday is chosen then the value in textboxam can only be 12-24
'if saturday is chosen then the value in textboxam can only be 20 or more
' for each one of the 3 comboboxoptions on error messagebox.show(" blah")
' once one of the 3 criteria is meet move on.
' do i use:
' if combobox1.text = "moNday" andalso textboxAm.text >= 8 andalso textboxAm.text <=12 then
' elseif messagebox.show("monday min is 8 and max is 12...please correct and continue')
' endif
Thank you very much for your help