[SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] i = 1 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]id = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum = ComboBox1.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].names = Label28.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].periods = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status1 = Label67.Text[/SIZE]
[SIZE=2]numunits = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(duedatelabel.Text)[/SIZE]
[SIZE=2]returntypes = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(postdatetxt.Text)[/SIZE]
[SIZE=2]paymentdates = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(paydatetxt.Text)[/SIZE]
[SIZE=2]receiptdates = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(receiptdatetxt.Text)[/SIZE]
[SIZE=2]checknum = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] i = 2 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]id1 = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum1 = ComboBox1.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].names1 = Label28.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].periods1 = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status2 = Label67.Text[/SIZE]
[SIZE=2]numunits1 = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented1 = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates1 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(duedatelabel.Text)[/SIZE]
[SIZE=2]returntypes1 = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates1 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(postdatetxt.Text)[/SIZE]
[SIZE=2]paymentdates1 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(paydatetxt.Text)[/SIZE]
[SIZE=2]receiptdates1 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(receiptdatetxt.Text)[/SIZE]
[SIZE=2]checknum1 = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt1 = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross1 = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt1 = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable1 = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust1 = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total1 = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection1 = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties1 = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests1 = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts1 = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid1 = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances1 = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance1 = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] i = 3 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]id2 = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum2 = ComboBox1.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].names2 = Label28.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].periods2 = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status3 = Label67.Text[/SIZE]
[SIZE=2]numunits2 = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented2 = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates2 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(duedatelabel.Text)[/SIZE]
[SIZE=2]returntypes2 = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates2 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(postdatetxt.Text)[/SIZE]
[SIZE=2]paymentdates2 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(paydatetxt.Text)[/SIZE]
[SIZE=2]receiptdates2 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(receiptdatetxt.Text)[/SIZE]
[SIZE=2]checknum2 = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt2 = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross2 = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt2 = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable2 = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust2 = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total2 = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection2 = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties2 = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests2 = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts2 = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid2 = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances2 = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance2 = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] i = 4 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]id3 = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum3 = ComboBox1.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].names3 = Label28.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].periods3 = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status4 = Label67.Text[/SIZE]
[SIZE=2]numunits3 = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented3 = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates3 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(duedatelabel.Text)[/SIZE]
[SIZE=2]returntypes3 = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates3 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(postdatetxt.Text)[/SIZE]
[SIZE=2]paymentdates3 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(paydatetxt.Text)[/SIZE]
[SIZE=2]receiptdates3 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(receiptdatetxt.Text)[/SIZE]
[SIZE=2]checknum3 = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt3 = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross3 = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt3 = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable3 = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust3 = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total3 = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection3 = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties3 = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests3 = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts3 = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid3 = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances3 = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance3 = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] i = 5 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]id4 = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum4 = ComboBox1.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].names4 = Label28.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].periods4 = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status5 = Label67.Text[/SIZE]
[SIZE=2]numunits4 = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented4 = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates4 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(duedatelabel.Text)[/SIZE]
[SIZE=2]returntypes4 = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates4 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(postdatetxt.Text)[/SIZE]
[SIZE=2]paymentdates4 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(paydatetxt.Text)[/SIZE]
[SIZE=2]receiptdates4 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(receiptdatetxt.Text)[/SIZE]
[SIZE=2]checknum4 = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt4 = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross4 = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt4 = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable4 = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust4 = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total4 = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection4 = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties4 = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests4 = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts4 = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid4 = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances4 = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance4 = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] i = 6 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]id5 = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum5 = ComboBox1.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].names5 = Label28.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].periods5 = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status6 = Label67.Text[/SIZE]
[SIZE=2]numunits5 = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented5 = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates5 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(duedatelabel.Text)[/SIZE]
[SIZE=2]returntypes5 = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates5 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(postdatetxt.Text)[/SIZE]
[SIZE=2]paymentdates5 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(paydatetxt.Text)[/SIZE]
[SIZE=2]receiptdates5 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(receiptdatetxt.Text)[/SIZE]
[SIZE=2]checknum5 = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt5 = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross5 = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt5 = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable5 = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust5 = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total5 = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection5 = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties5 = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests5 = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts5 = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid5 = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances5 = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance5 = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] i = 7 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]id6 = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum6 = ComboBox1.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].names6 = Label28.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].periods6 = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status7 = Label67.Text[/SIZE]
[SIZE=2]numunits6 = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented6 = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates6 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(duedatelabel.Text)[/SIZE]
[SIZE=2]returntypes6 = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates6 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(postdatetxt.Text)[/SIZE]
[SIZE=2]paymentdates6 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(paydatetxt.Text)[/SIZE]
[SIZE=2]receiptdates6 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(receiptdatetxt.Text)[/SIZE]
[SIZE=2]checknum6 = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt6 = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross6 = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt6 = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable6 = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust6 = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total6 = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection6 = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties6 = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests6 = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts6 = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid6 = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances6 = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance6 = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] i = 8 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]id7 = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum7 = ComboBox1.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].names7 = Label28.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].periods7 = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status8 = Label67.Text[/SIZE]
[SIZE=2]numunits7 = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented7 = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates7 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(duedatelabel.Text)[/SIZE]
[SIZE=2]returntypes7 = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates7 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(postdatetxt.Text)[/SIZE]
[SIZE=2]paymentdates7 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(paydatetxt.Text)[/SIZE]
[SIZE=2]receiptdates7 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(receiptdatetxt.Text)[/SIZE]
[SIZE=2]checknum7 = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt7 = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross7 = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt7 = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable7 = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust7 = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total7 = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection7 = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties7 = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests7 = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts7 = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid7 = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances7 = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance7 = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] i = 9 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]id8 = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum8 = ComboBox1.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].names8 = Label28.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].periods8 = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status9 = Label67.Text[/SIZE]
[SIZE=2]numunits8 = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented8 = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates8 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(duedatelabel.Text)[/SIZE]
[SIZE=2]returntypes8 = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates8 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(postdatetxt.Text)[/SIZE]
[SIZE=2]paymentdates8 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(paydatetxt.Text)[/SIZE]
[SIZE=2]receiptdates8 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(receiptdatetxt.Text)[/SIZE]
[SIZE=2]checknum8 = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt8 = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross8 = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt8 = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable8 = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust8 = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total8 = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection8 = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties8 = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests8 = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts8 = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid8 = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances8 = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance8 = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] i = 10 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]id9 = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum9 = ComboBox1.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].names9 = Label28.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].periods9 = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status10 = Label67.Text[/SIZE]
[SIZE=2]numunits9 = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented9 = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates9 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(duedatelabel.Text)[/SIZE]
[SIZE=2]returntypes9 = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates9 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(postdatetxt.Text)[/SIZE]
[SIZE=2]paymentdates9 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(paydatetxt.Text)[/SIZE]
[SIZE=2]receiptdates9 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(receiptdatetxt.Text)[/SIZE]
[SIZE=2]checknum9 = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt9 = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross9 = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt9 = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable9 = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust9 = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total9 = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection9 = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties9 = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests9 = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts9 = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid9 = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances9 = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance9 = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] i = 11 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]id10 = ComboBox1.SelectedValue[/SIZE]
[SIZE=2]acctnum10 = ComboBox1.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].names10 = Label28.Text[/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].periods10 = Val(ComboBox2.Text)[/SIZE]
[SIZE=2]status11 = Label67.Text[/SIZE]
[SIZE=2]numunits10 = Val(availabletxt.Text)[/SIZE]
[SIZE=2]numrented10 = Val(rentedtxt.Text)[/SIZE]
[SIZE=2]duedates10 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(duedatelabel.Text)[/SIZE]
[SIZE=2]returntypes10 = returntypelabel.Text[/SIZE]
[SIZE=2]postingdates10 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(postdatetxt.Text)[/SIZE]
[SIZE=2]paymentdates10 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(paydatetxt.Text)[/SIZE]
[SIZE=2]receiptdates10 = [/SIZE][SIZE=2][COLOR=#0000ff]Date[/COLOR][/SIZE][SIZE=2].Parse(receiptdatetxt.Text)[/SIZE]
[SIZE=2]checknum10 = Val(checknumtxt.Text)[/SIZE]
[SIZE=2]checkamt10 = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]gross10 = Val(grosstxt.Text)[/SIZE]
[SIZE=2]exempt10 = Val(exempttxt.Text)[/SIZE]
[SIZE=2]taxable10 = Val(taxabletxt.Text)[/SIZE]
[SIZE=2]adjust10 = Val(adjusttxt.Text)[/SIZE]
[SIZE=2]total10 = Val(totalduetxt.Text)[/SIZE]
[SIZE=2]collection10 = Val(collectiontxt.Text)[/SIZE]
[SIZE=2]penalties10 = Val(penaltytxt.Text)[/SIZE]
[SIZE=2]interests10 = Val(interesttxt.Text)[/SIZE]
[SIZE=2]totalamounts10 = Val(amountduetxt.Text)[/SIZE]
[SIZE=2]totalspaid10 = Val(totalpaidtxt.Text)[/SIZE]
[SIZE=2]returnbalances10 = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]acctbalance10 = Val(accountbaltxt.Text)[/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception[/SIZE]
[SIZE=2]MessageBox.Show(ex.Message)[/SIZE]
[SIZE=2][COLOR=#008000]'will need to take this exception out once error checking is complete...[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'grossreceipts = Decimal.Round(CType(grosstxt.Text, Decimal), 2) 'enter gross receipts manually in order to pass the value to a variable[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'exemptreceipts = Decimal.Round(CType(exempttxt.Text, Decimal), 2)[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'taxablereceipts = Decimal.Round(grossreceipts - exemptreceipts, 2) 'calculates taxable receipts[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'taxabletxt.Text = Decimal.Round(taxablereceipts, 2) 'sets the visible text value of the textbox to the taxable receipts value[/COLOR][/SIZE]
[SIZE=2]taxb4adjust = taxablereceipts * 0.04 [/SIZE][SIZE=2][COLOR=#008000]'Decimal.Round(taxablereceipts, 2) ' declares a new vaiable to hold value of tax before the adjustments, penalties, etc...(do not believe this is a needed step, TBD)[/COLOR][/SIZE]
[SIZE=2]taxb4adjtxt.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(taxb4adjust, 2) [/SIZE][SIZE=2][COLOR=#008000]' sets the visible property of the textbox to the tax before adjustments value[/COLOR][/SIZE]
[SIZE=2]auditb4adjustlabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(taxb4adjust, 2)[/SIZE]
[SIZE=2][COLOR=#008000]'If Val(previousadjustlabel.Text) = 0 Then[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'adjustments = Val(adjusttxt.Text)[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'Else[/COLOR][/SIZE]
[SIZE=2]adjustments = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round([/SIZE][SIZE=2][COLOR=#0000ff]CType[/COLOR][/SIZE][SIZE=2](previousadjustlabel.Text, [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]), 2) [/SIZE][SIZE=2][COLOR=#008000]'label holds previous balance adjustments that have not been paid previously(need dataset defining previous fees for certain account in order to draw those unpaid values)[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'End If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] adjustments < 0 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE][SIZE=2][COLOR=#008000]'if they owe[/COLOR][/SIZE]
[SIZE=2]dueadjustlabel.Text = adjustments * -1[/SIZE]
[SIZE=2]differenceadjustlabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(adjustments, 2) - Val(adjusttxt.Text)[/SIZE]
[SIZE=2]auditadjustmentslabel.Text = adjustments [/SIZE][SIZE=2][COLOR=#008000]'Val(dueadjustlabel.Text) - Val(previousadjustlabel.Text)[/COLOR][/SIZE]
[SIZE=2]totaltax = (taxb4adjust - adjustments) - Val(previoustotalduelabel.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]Else[/COLOR][/SIZE]
[SIZE=2]dueadjustlabel.Text = [/SIZE][SIZE=2][COLOR=#800000]"0.00"[/COLOR][/SIZE][SIZE=2][COLOR=#008000]' if we owe[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'adjustments = -(adjustments)[/COLOR][/SIZE]
[SIZE=2]differenceadjustlabel.Text = adjustments + Val(adjusttxt.Text) [/SIZE][SIZE=2][COLOR=#008000]'Decimal.Round(-adjustments, 2) + Val(adjusttxt.Text) ',2)[/COLOR][/SIZE]
[SIZE=2]auditadjustmentslabel.Text = Val(dueadjustlabel.Text) + Val(previousadjustlabel.Text)[/SIZE]
[SIZE=2]totaltax = (taxb4adjust - adjustments) - Val(previoustotalduelabel.Text) [/SIZE][SIZE=2][COLOR=#008000]'was adding the value of the label, but the value being received should always be negative -(-)=+[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2]totalduetxt.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(totaltax, 2) [/SIZE][SIZE=2][COLOR=#008000]' sets the visible property of the textbox to the variable totaltax[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'If Val(previoustotalduelabel.Text) < 0 Then[/COLOR][/SIZE]
[SIZE=2]audittotalduelabel.Text = totaltax - Val(previoustotalduelabel.Text)[/SIZE]
[SIZE=2][COLOR=#008000]'ElseIf Val(previoustotalduelabel.Text) > 0 Then[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'End If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] totaltax <= 1200 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE][SIZE=2][COLOR=#008000]' if statement to determine whether the collection allowance will be 2.5% or $30 and also takes into account any old allowances due[/COLOR][/SIZE]
[SIZE=2]collectionallowance = (totaltax * 0.025) - Val(previouscollectionlabel.Text) [/SIZE][SIZE=2][COLOR=#008000]' ""[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Else[/COLOR][/SIZE]
[SIZE=2]collectionallowance = 30.0 [/SIZE][SIZE=2][COLOR=#008000]'- Val(previouscollectionlabel.Text) ' ""[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2]duecollectionlabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(collectionallowance, 2) [/SIZE][SIZE=2][COLOR=#008000]' sets the visible text property to the value of the collectionallowance variable[/COLOR][/SIZE]
[SIZE=2]auditcollectionlabel.Text = Val(duecollectionlabel.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] Val(duecollectionlabel.Text) < 0 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] difference [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2]difference = Val(duecollectionlabel.Text) + Val(collectiontxt.Text)[/SIZE]
[SIZE=2]differencecollectionlabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(difference, 2)[/SIZE]
[SIZE=2][COLOR=#0000ff]Else[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] difference [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2]difference = Val(collectiontxt.Text) - [/SIZE][SIZE=2][COLOR=#0000ff]CType[/COLOR][/SIZE][SIZE=2](duecollectionlabel.Text, [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]) [/SIZE][SIZE=2][COLOR=#008000]'right now both the values in this row show positive(one should show negative until evened out)[/COLOR][/SIZE]
[SIZE=2]differencecollectionlabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(difference, 2)[/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'this is starting point for positive/negative calculations[/COLOR][/SIZE]
[SIZE=2]interestperiod = Val(ComboBox2.Text) [/SIZE][SIZE=2][COLOR=#008000]'may need dataset to call account periods to display, if so a combobox is required instead of a textbox else this can be left up to the user to insert manually[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'changed the above line to read from the new combobox instead of a textbox[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'this IF statement will determine what period the return is for and what the interest percentages are [/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] interestperiod >= 200001 [/SIZE][SIZE=2][COLOR=#0000ff]And[/COLOR][/SIZE][SIZE=2] interestperiod <= 200112 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]interest = 0.12[/SIZE]
[SIZE=2]dailyinterest = 0.000327869[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] interestperiod >= 200201 [/SIZE][SIZE=2][COLOR=#0000ff]And[/COLOR][/SIZE][SIZE=2] interestperiod <= 200206 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]interest = 0.11[/SIZE]
[SIZE=2]dailyinterest = 0.00030137[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] interestperiod >= 200207 [/SIZE][SIZE=2][COLOR=#0000ff]And[/COLOR][/SIZE][SIZE=2] interestperiod <= 200306 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]interest = 0.09[/SIZE]
[SIZE=2]dailyinterest = 0.000246575[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] interestperiod >= 200307 [/SIZE][SIZE=2][COLOR=#0000ff]And[/COLOR][/SIZE][SIZE=2] interestperiod <= 200506 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]interest = 0.08[/SIZE]
[SIZE=2]dailyinterest = 0.000219178[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] interestperiod >= 200507 [/SIZE][SIZE=2][COLOR=#0000ff]And[/COLOR][/SIZE][SIZE=2] interestperiod <= 200512 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]interest = 0.09[/SIZE]
[SIZE=2]dailyinterest = 0.000246575[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] interestperiod >= 200601 [/SIZE][SIZE=2][COLOR=#0000ff]And[/COLOR][/SIZE][SIZE=2] interestperiod <= 200606 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]interest = 0.1[/SIZE]
[SIZE=2]dailyinterest = 0.000273973[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] interestperiod >= 200607 [/SIZE][SIZE=2][COLOR=#0000ff]And[/COLOR][/SIZE][SIZE=2] interestperiod <= 200612 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]interest = 0.11[/SIZE]
[SIZE=2]dailyinterest = 0.00030137[/SIZE]
[SIZE=2][COLOR=#0000ff]Else[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2]interest = InputBox([/SIZE][SIZE=2][COLOR=#800000]"Please Enter the Current Interest Amount"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]dailyinterest = InputBox([/SIZE][SIZE=2][COLOR=#800000]"Please Calculate and Enter the Interest Accrued on a Daily Basis"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]interestperiod = InputBox([/SIZE][SIZE=2][COLOR=#800000]"Please Define the Current Interest Period"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]ComboBox2.Text = interestperiod[/SIZE]
[SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception[/SIZE]
[SIZE=2]MsgBox([/SIZE][SIZE=2][COLOR=#800000]"You must enter an interest amount, a daily interest amount and an interest period in order for calculations to be valid."[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] interest = 0 [/SIZE][SIZE=2][COLOR=#0000ff]Or[/COLOR][/SIZE][SIZE=2] Str(interest) = [/SIZE][SIZE=2][COLOR=#800000]""[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Do[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]While[/COLOR][/SIZE][SIZE=2] interest = 0 [/SIZE][SIZE=2][COLOR=#0000ff]Or[/COLOR][/SIZE][SIZE=2] Str(interest) = [/SIZE][SIZE=2][COLOR=#800000]""[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2]interest = InputBox([/SIZE][SIZE=2][COLOR=#800000]"Please Enter the Current Interest Amount"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex1 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception[/SIZE]
[SIZE=2]MsgBox([/SIZE][SIZE=2][COLOR=#800000]"You must enter an interest amount in order for calculations to be valid."[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Loop[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Do[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]While[/COLOR][/SIZE][SIZE=2] dailyinterest = 0 [/SIZE][SIZE=2][COLOR=#0000ff]Or[/COLOR][/SIZE][SIZE=2] Str(dailyinterest) = [/SIZE][SIZE=2][COLOR=#800000]""[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] dailyinterest = 0 [/SIZE][SIZE=2][COLOR=#0000ff]Or[/COLOR][/SIZE][SIZE=2] Str(dailyinterest) = [/SIZE][SIZE=2][COLOR=#800000]""[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2]dailyinterest = InputBox([/SIZE][SIZE=2][COLOR=#800000]"Please Calculate and Enter the Interest Accrued on a Daily Basis"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex2 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception[/SIZE]
[SIZE=2]MsgBox([/SIZE][SIZE=2][COLOR=#800000]"You must enter a daily interest amount in order for the calculations to be valid."[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Loop[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Do[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]While[/COLOR][/SIZE][SIZE=2] interestperiod = 0 [/SIZE][SIZE=2][COLOR=#0000ff]Or[/COLOR][/SIZE][SIZE=2] Str(interestperiod) = [/SIZE][SIZE=2][COLOR=#800000]""[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] interestperiod = 0 [/SIZE][SIZE=2][COLOR=#0000ff]Or[/COLOR][/SIZE][SIZE=2] Str(interestperiod) = [/SIZE][SIZE=2][COLOR=#800000]""[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2]interestperiod = InputBox([/SIZE][SIZE=2][COLOR=#800000]"Please Define the Current Interest Period"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]ComboBox2.Text = interestperiod[/SIZE]
[SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex3 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception[/SIZE]
[SIZE=2]MsgBox([/SIZE][SIZE=2][COLOR=#800000]"Please Define the Current Interest Period"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Loop[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] numofdays > 0 [/SIZE][SIZE=2][COLOR=#0000ff]And[/COLOR][/SIZE][SIZE=2] CheckBox1.Checked = [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]dailyinterest = dailyinterest * numofdays[/SIZE]
[SIZE=2]penalty = totaltax * 0.1[/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] penalty < 50 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]penalty = 50[/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Else[/COLOR][/SIZE]
[SIZE=2]dailyinterest = 0[/SIZE]
[SIZE=2]penalty = 0[/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2]TextBox23.Text = dailyinterest [/SIZE][SIZE=2][COLOR=#008000]'temporary textbox to display the current daily interest %[/COLOR][/SIZE]
[SIZE=2]TextBox22.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(interest, 2) [/SIZE][SIZE=2][COLOR=#008000]'temporary textbox to display the current interest %[/COLOR][/SIZE]
[SIZE=2]penalty = penalty + Val(previouspenaltylabel.Text)[/SIZE]
[SIZE=2]penalty = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(penalty, 2)[/SIZE]
[SIZE=2]duepenaltylabel.Text = penalty[/SIZE]
[SIZE=2]differencepenaltylabel.Text = Val(penaltytxt.Text) - penalty [/SIZE][SIZE=2][COLOR=#008000]'CType(previouspenaltylabel.Text, Decimal)[/COLOR][/SIZE]
[SIZE=2]auditpenaltylabel.Text = Val(duepenaltylabel.Text) [/SIZE][SIZE=2][COLOR=#008000]'Decimal.Round(penalty - CType(previouspenaltylabel.Text, Decimal), 2)[/COLOR][/SIZE]
[SIZE=2]totalpaid = Val(checkamttxt.Text)[/SIZE]
[SIZE=2]totaldue = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(totaltax + penalty + collectionallowance - [/SIZE][SIZE=2][COLOR=#0000ff]CType[/COLOR][/SIZE][SIZE=2](previousamountduelabel.Text, [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]), 2) [/SIZE][SIZE=2][COLOR=#008000]' ""[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] CheckBox1.Checked = [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]interestamount = (dailyinterest * totaldue) [/SIZE][SIZE=2][COLOR=#008000]'* interest[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Else[/COLOR][/SIZE]
[SIZE=2]interestamount = 0 [/SIZE][SIZE=2][COLOR=#008000]'(interest * totaldue)[/COLOR][/SIZE]
[SIZE=2]penalty = 0[/SIZE]
[SIZE=2]duepenaltylabel.Text = 0.0[/SIZE]
[SIZE=2]differencepenaltylabel.Text = Val(penaltytxt.Text) - penalty[/SIZE]
[SIZE=2]flag = [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2]dueinterestlabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(interestamount - [/SIZE][SIZE=2][COLOR=#0000ff]CType[/COLOR][/SIZE][SIZE=2](previousinterestlabel.Text, [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2]), 2)[/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] Val(dueinterestlabel.Text) < 0 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] difference1 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2]difference1 = Val(interesttxt.Text) + [/SIZE][SIZE=2][COLOR=#0000ff]CType[/COLOR][/SIZE][SIZE=2](dueinterestlabel.Text, [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]differenceinterestlabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(difference1, 2)[/SIZE]
[SIZE=2]auditinterestlabel.Text = Val(dueinterestlabel.Text)[/SIZE]
[SIZE=2][COLOR=#0000ff]Else[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] difference1 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE]
[SIZE=2]difference1 = Val(interesttxt.Text) - [/SIZE][SIZE=2][COLOR=#0000ff]CType[/COLOR][/SIZE][SIZE=2](dueinterestlabel.Text, [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]differenceinterestlabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(difference1, 2)[/SIZE]
[SIZE=2]auditinterestlabel.Text = Val(dueinterestlabel.Text)[/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2]totalwithinterest = interestamount + totaldue[/SIZE]
[SIZE=2]amountduetxt.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(totalwithinterest, 2)[/SIZE]
[SIZE=2]returnbalance = totalwithinterest - totalpaid[/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] totalpaid > totaldue [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE][SIZE=2][COLOR=#008000]'this if statement is to make sure that reimbursements show up as positive and insufficient payments show up as negative[/COLOR][/SIZE]
[SIZE=2]returnbalance = -(returnbalance)[/SIZE]
[SIZE=2][COLOR=#0000ff]ElseIf[/COLOR][/SIZE][SIZE=2] totalpaid < totaldue [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]returnbalance = -(returnbalance)[/SIZE]
[SIZE=2][COLOR=#008000]'Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2]totalpaidtxt.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(totalpaid, 2)[/SIZE]
[SIZE=2][COLOR=#008000]'need conditional IF statement to take the return balance from the account balance when the return has a negative balance and the account has a positive balance[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'also need to use a select case statement in order to cut down on process time[/COLOR][/SIZE]
[SIZE=2]returnbaltxt.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(returnbalance, 2)[/SIZE]
[SIZE=2]auditreturnbalancelabel.Text = Val(returnbaltxt.Text)[/SIZE]
[SIZE=2]accountbaltxt.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(returnbalance, 2) [/SIZE][SIZE=2][COLOR=#008000]'Decimal.Round(Val(Label36.Text) + Val(Label39.Text) + Val(Label42.Text) + Val(Label46.Text) + Val(Label50.Text) + Val(Label54.Text) + Val(Label58.Text) + Val(Label62.Text), 2)[/COLOR][/SIZE]
[SIZE=2]duetaxablelabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(taxablereceipts, 2)[/SIZE]
[SIZE=2]dueb4adjustlabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(taxb4adjust, 2)[/SIZE]
[SIZE=2]duetotalduelabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(totaltax, 2)[/SIZE]
[SIZE=2]differenceamountduelabel.Text = totalpaid - totalwithinterest [/SIZE][SIZE=2][COLOR=#008000]'Decimal.Round(returnbalances, 2) ' here is the reason I am getting the wrong values in the table.[/COLOR][/SIZE]
[SIZE=2]dueamountduelabel.Text = [/SIZE][SIZE=2][COLOR=#0000ff]Decimal[/COLOR][/SIZE][SIZE=2].Round(totaldue + interestamount, 2)[/SIZE]
[SIZE=2]auditamountduelabel.Text = Val(dueamountduelabel.Text)[/SIZE]