Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
Dim Conn As New OleDbConnection(strConnection)
Dim Comm As New OleDb.OleDbCommand()
Conn.Open()
Dim strSQL As String
Dim strSQL2 As String
strSQL = "insert into [GROUP_USERS] ([GROUP_USER],[USER_NAME],[Create_Date]) values ('" & TextBox1.Text & "','" & ListBox1.Text & "', getdate()) "
strSQL2 = "insert into [PERMISSION_REPORTS] ([GROUP_USER],[USER_NAME],[Create_Date]) values ('" & TextBox1.Text & "','" & ListBox1.Text & "', getdate())"
Dim i As Integer
Comm.Connection = Conn
Comm.CommandType = CommandType.Text
Comm.CommandText = strSQL
Comm.ExecuteNonQuery()
Comm.CommandText = strSQL2
Comm.ExecuteNonQuery()
For i = 0 To ListBox1.Items.Count - 1
Comm.Parameters.AddWithValue("USER_NAME", ListBox1.Items.Item(i))
Next
Comm.ExecuteNonQuery()
Conn.Dispose()
Comm.Dispose()
'MessageBox.Show(strSQL)
Me.Close()
User_Group_List.Show()
End Sub