I
Iggv
is there a way i can change by codification the Link child Fields and LKink
Master Fields of a sub form.?
I have an db with telephone numbers.
In the form i have two list box, one where i chose by wich colum i want to
search
Private Sub LstOpciones_BeforeUpdate(Cancel As Integer)
Select Case LstOpciones
Case "Por Empresa"
LstBusqueda.RowSource = "Select Nombres.Empresa FROM Nombres
group by Nombres.Empresa"
Case "Por Apellido"
LstBusqueda.RowSource = "Select Nombres.Apellido FROM
Nombres group by Nombres.Apellido"
Case "Por Nombre"
LstBusqueda.RowSource = "Select Nombres.Nombre FROM
Nombres group by Nombres.Nombre"
End Select
End Sub
and the other show me the data of each colum,
and a botton that searchs the base
Private Sub Buscar_Click()
Select Case LstOpciones
Case "Por Empresa"
Me.Filter = "[EMPRESA] = " & Chr(34) & (LstBusqueda) & Chr(34)
Me.FilterOn = True
Case "Por Apellido"
Me.Filter = "[Apellido] = " & Chr(34) & (LstBusqueda) & Chr(34)
Me.FilterOn = True
Case "Por Nombre"
Me.Filter = "[Nombre] = " & Chr(34) & (LstBusqueda) & Chr(34)
Me.FilterOn = True
End Select
but it dosent work unles i change the child and master fields to EMPRESA,
NOMBRE or APELLIDO.
Master Fields of a sub form.?
I have an db with telephone numbers.
In the form i have two list box, one where i chose by wich colum i want to
search
Private Sub LstOpciones_BeforeUpdate(Cancel As Integer)
Select Case LstOpciones
Case "Por Empresa"
LstBusqueda.RowSource = "Select Nombres.Empresa FROM Nombres
group by Nombres.Empresa"
Case "Por Apellido"
LstBusqueda.RowSource = "Select Nombres.Apellido FROM
Nombres group by Nombres.Apellido"
Case "Por Nombre"
LstBusqueda.RowSource = "Select Nombres.Nombre FROM
Nombres group by Nombres.Nombre"
End Select
End Sub
and the other show me the data of each colum,
and a botton that searchs the base
Private Sub Buscar_Click()
Select Case LstOpciones
Case "Por Empresa"
Me.Filter = "[EMPRESA] = " & Chr(34) & (LstBusqueda) & Chr(34)
Me.FilterOn = True
Case "Por Apellido"
Me.Filter = "[Apellido] = " & Chr(34) & (LstBusqueda) & Chr(34)
Me.FilterOn = True
Case "Por Nombre"
Me.Filter = "[Nombre] = " & Chr(34) & (LstBusqueda) & Chr(34)
Me.FilterOn = True
End Select
but it dosent work unles i change the child and master fields to EMPRESA,
NOMBRE or APELLIDO.