Dim SomethingElse() as String = dose
doesn't work because both variables still reference the same array instance. Use the array's Clone method to create the second copy for you.
Dim dose() As String = {"1/2", "1", "1 & 1/2", "2", "2 & 1/2", "3", "4", "5", "6", "1/2 ml", "1 & 1/2 ml", "2 ml", "2 & 1/2 ml", "3 ml", "4 ml", "5 ml", "10 ml", "15 ml"}
Dim SomethingElse() as String = dose.Clone
cboMedDose.DataSource = dose
cboPatDose.DataSource = SomethingElse
The only way I've found around this problem, is to create two arrays, one for each combo box, that store the same stuff. This is what my code that doesn't work looks like:
This is the code that works where I create another array:
I tried this as well, and it didn't work:
If anyone could think of a better solution I'd really appreciate it.
Thanks
Cristy