Código:
Imports System.Data Imports System.Data.OleDb Public Class frmListaContratos Dim adaptador As New OleDbDataAdapter Dim registros As New DataSet Private Sub frmListaContratos_Load(sender As Object, e As EventArgs) Handles MyBase.Load conectarse() LlenarGrid() End Sub Private Sub LlenarGrid() Dim consultar As String consultar = "SELECT a.id_alquiler,a.id_inmueble FROM alquileres a, clientes b WHERE a.idlocatario=b.id_clientes" adaptador = New OleDbDataAdapter(consultar, conexion) registros = New DataSet adaptador.Fill(registros, "alquileres") 'ACA SE DA EL ERROR NO SE COMO INDICAR LAS DOS TABLAS dgv1.DataSource = registros dgv1.DataMember = "alquileres" End Sub End Class