help with the code please

dami

Member
Local time
Yesterday, 20:05
Joined
Mar 22, 2021
Messages
65
Hola, necesitaría que alguien me dijera que estoy cometiendo un error en este código ... todo funciona, pero el campo combinado que busca el campo sí / no ....... no funciona. ...

Sub privado buscar_Click ()
Dim misql como cadena
Dim inte como byte

inte = 0


Si no es IsNull (Me.Cuadro_combinado4.Value) Entonces
Si inte = 0 Entonces
misql = "clientes = '" & Me.Cuadro_combinado4.Value & "'"
Demás
misql = misql & "y clientes = '" & Me.Cuadro_combinado4.Value & "'"
Terminara si

inte = 1
Terminara si

Si No IsNull (Me.Cuadro_combinado11.Value) Entonces
Si inte = 0 Entonces
misql = "mes = '" & Me.Cuadro_combinado11.Value & "'"
Demás
misql = misql & "y Mes = '" & Me.Cuadro_combinado11.Value & "'"
Terminara si

inte = 1
Terminara si

Si no es IsNull (Me.Cuadro_combinado14.Value) Entonces
Si inte = 0 Entonces
misql = "año = '" & Me.Cuadro_combinado14.Value & "'"
Demás
misql = misql & "y año = '" & Me.Cuadro_combinado14.Value & "'"
Terminara si

inte = 1
Terminara si

Si no es IsNull (Me.Cuadro_combinado50.Value) Entonces
Si inte = 0 Entonces
misql = "Rubricado =" rubricado ""
Demás
misql = Me.subrubricas.Form.Filter = "Rubricado = True"
Terminara si

inte = 1
Terminara si

Si inte = 0 Entonces
MsgBox ("Ingresar datos para buscar")
Demás
Me.subrubricas.Visible = True
Me.subrubricas.Form.Filter = misql
Me.subrubricas.Form.FilterOn = True

Terminara si
End Sub

Cuadro_combinado50 es el que me da error
 
This must be related to this other thread. Esto debe estar relacionado con este otro subproceso.
 
si pero no puedo conseguir que alguien me ayude
 
¿Usted ve mi pregunta sobre si puede nos compartir una copia su base de datos?
 
Muchas gracias por tu tiempo ....... me va bien es un genio ..... una consulta por ejemplo si selecciono un cliente me filtra bien y si luego selecciono el año p. Ej. 2020 me filtra por ese cliente ese año. .... pero con este campo no funciona así ... ¿hay alguna manera de hacerlo funcionar?
 
genius genius genius thank you very much thank you very much
heaven has won
 
Well DBG, if you are using a translator, kudos for the effort. If not, your Spanish is impressive!
 
Mine is limited to Dos Cervesa :)
 
Well DBG, if you are using a translator, kudos for the effort. If not, your Spanish is impressive!
@NauticalGent Thank you! Before the pandemic hit, we went on vacation to Spain. Before going, I decided to learn Spanish. Since I live in California, I thought it would be useful anyway. I am still learning. I can put together simple sentences, but I know my grammar is still off. Hopefully, they can understand what I am trying to say. Cheers!
 
Is there a way to print the subform after the filter is applied from the main form?
 
Is there a way to print the subform after the filter is applied from the main form?
Printing output is normally a function of a report. So, I would recommend creating a report with the same record source as the subform. You can then open it with the same filter you're using for the subform to output the same filtered data on the report.
 
auto_awesome
Quizás quisiste decir: ah ok pero se va a abrir simultaneamente con el subformulario? osea tengo que crear un informe a la vez que el subformulario?


sube el volumen
126/5000

Resultados de traducción​

ahh ok, pero ¿se abrirá simultáneamente con el subformulario? Quiero decir, ¿tengo que crear un informe al mismo tiempo que el subformulario?
 

Users who are viewing this thread

Back
Top Bottom