I’m currectly studing the bunifu and trying to create test programs for education purpuse only .
I have a question if someone can help me out. I’m using VB.net 2015 and mysql
I’m trying to make this:
Form1(AdminMenu) is my main form.
Form2(UsersAddCP) is my sub form
In form1 i had added Panel and i want to open Form2 inside of it.
Inside the form2 i have 7 textboxes 4 checkboxes and 1 button (Form2 is register user)
And i have a problem when i fill all fields and press the button from the Form2 , in mysql database is created new record but all fields are empty, it looks like whatever i type is not readed. But if i set in textboxes default value text in mysql create it with this information.
In form1 button to open form2 in panel is like this:
Dim form2 AsUsersAddCP=NewUsersAddCP()
Dim form1 AsAdminMenu=CType(Application.OpenForms("AdminMenu"),AdminMenu)
Dim panel1 AsPanel=CType(form1.Controls("panel1"),Panel)
What is the problem that when i type information in textboxes and click the button in Form2 is not reading anything.
Please note if i make Form2 to show as normal open new window form and fill the textboxes and checkboxes all records are added correctly. I’m having only the problem with Panels . Please someone can help me out, i cannot find any guide or someone to help me.
I would be glad if someone make video about this it will help a lot of people like me that are trying this.
I must note that in form2 button save uses RegisterUser() module to insert all the information
Here is my code :
.CommandText="INSERT INTO users(uname,upassword,ucode,ucreate,utools,usearch)VALUES(@user,@pass,@ucd,@crt,@uto,@usrh)"