Access VBA, subform allowedit allow deleting
Publicado por Genaro (1 intervención) el 13/02/2017 05:17:02
Hola a todos!
Tengo este código en un textbox on click
Id se encuentra en el SubForm "sfListaOrdenesActivasParaMostradores"
Al hacer click en Id del "sfListaOrdenesActivasParaMostradores", debe hacer lo siguiente:
Alguna idea?
Tengo este código en un textbox on click
1
2
3
Formulario: "Mostradores"
SubForm "ItemsEnConsulta", que sí está emparentado a "Mostradores" por un campo llamado Id.
SubForm "sfListaOrdenesActivasParaMostradores", el cual no está emparentado a "Mostradores".
Id se encuentra en el SubForm "sfListaOrdenesActivasParaMostradores"
Al hacer click en Id del "sfListaOrdenesActivasParaMostradores", debe hacer lo siguiente:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Private Sub Id_Click()
Dim Items As SubForm
Set Items = Forms!Mostradores!ItemsEnConsulta
IdABuscar = Forms!Mostradores!SF_OrdenesActivasParaMostradores.Form!Id
Forms.Mostradores.DataEntry = False
Forms.Mostradores.Filter = "Id = " & IdABuscar
Screen.ActiveForm.FilterOn = True
If Módulo1.Nivel = "Mostrador" Then
Screen.ActiveForm.AllowEdits = False
Items.SetFocus
Me.AllowDeletions = False
'Esto lo he probado con Me!ItemsEnConsulta.Form.AlloEdits = False y también con Me.ItemsEnConsulta.Form.AlloEdits = False
Me.AllowEdits = False
End If
End Sub
Alguna idea?
Valora esta pregunta


0