0

please help me.. i keep searching anywhere but find no answer

i want to set the default value of a combobox in my edit account module based on the levelofaccesstextbox in my login module but my codes doesn't work

here's my code:

Private Sub editaccount_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If login.LevelofAccessTextBox.Text = "Student" Then
With Me.ComboBox1.Items
.Add("Student")
End With
End If
End Sub
5
Contributors
7
Replies
8
Views
5 Years
Discussion Span
Last Post by jhedonghae
0

my advice is to step through the code and figure out what your "LevelofAccessTextBox.Text" equals. Then come back here to update your issue.

0

it should be equal to the level of access that is in the LevelofAccessTextBox.Text

0

actually my problem is now solved thanks for everyone's help i used this code instead

Private Sub editaccount_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
Dim x1 As String
x1 = login.LevelofAccessTextBox.Text
TextBox9.Text = x1
End Sub

I replace combobox with textbox

0

Y use a variable??? u could have also done without a variable...just suggested...

TextBox9.Text = login.LevelofAccessTextBox.Text
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.