Código
Private Sub btGenerarQR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btGenerarQR.Click Dim cadenaconexion As String Dim miconexion As OleDbConnection Dim adaptador As OleDbDataAdapter Dim data As DataSet For j = 0 To 4 cadenaconexion = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Ronny\Desktop\Base_Animales.accdb" miconexion = New OleDbConnection(cadenaconexion) adaptador = New OleDbDataAdapter adaptador.SelectCommand = New OleDbCommand("SELECT * FROM Mascota", miconexion) data = New DataSet data.Tables.Add("Mascota") adaptador.Fill(data.Tables("Mascota")) num.DataSource = data.Tables("Mascota") txtVcardMascota.DataBindings.Clear() txtVcardRaza.DataBindings.Clear() txtVcardDueno.DataBindings.Clear() txtVcardTel.DataBindings.Clear() txtVcardCel.DataBindings.Clear() System.Threading.Thread.Sleep(1000) ' 1 segundo num.DisplayMember = "Numero" num.Text = Val(j) txtVcardMascota.DataBindings.Add("Text", data.Tables("Mascota"), "Nombre de la Mascota") txtVcardRaza.DataBindings.Add("Text", data.Tables("Mascota"), "Raza de la Mascota") txtVcardDueno.DataBindings.Add("Text", data.Tables("Mascota"), "Apellidos y Nombres del Propietario") txtVcardTel.DataBindings.Add("Text", data.Tables("Mascota"), "Teléfono del Propietario") txtVcardCel.DataBindings.Add("Text", data.Tables("Mascota"), "Celular del Propietario") Next end Sub
Mod: Al publicar código usar las etiquetas GeSHi