Yajo
05-26-2008, 02:43 AM
EDIT: PLEASE MOVE THIS TO ACCESS HELP, i don't know why is it here....
Hello,
I'm having some trouble with one subform. This subform has a field called "Fecha" wich is a date. In the main form there are 2 independent fields called "Desde" and "Hasta", wich are respectively for telling the starting and ending dates the subform must filter.
I need to use the subform in diferent main forms, so the problem is I can't access to the main form by using the "parent" statement, so I guess I'm doing something wrong. What I'm doing for now with the subform record source is this, wich works, but makes me need different copies of the subform, :banghead: one for each main form:
SELECT * FROM [Detalles Factura Emitida]
WHERE Fecha Between forms!cuadrante!desde And forms!cuadrante!hasta
Note: in this case, the main form's name is "Cuadrante".
The code I have tested:
SELECT * FROM [Detalles Factura Emitida]
WHERE Fecha Between parent!desde And parent!hasta
It just shows no records. I also tried this another method, with the same result:
SELECT * FROM [Detalles Factura Emitida]
WHERE Fecha >= parent!desde and fecha <= parent!hasta
Any ideas of how could I make this? :help
Thanks
Hello,
I'm having some trouble with one subform. This subform has a field called "Fecha" wich is a date. In the main form there are 2 independent fields called "Desde" and "Hasta", wich are respectively for telling the starting and ending dates the subform must filter.
I need to use the subform in diferent main forms, so the problem is I can't access to the main form by using the "parent" statement, so I guess I'm doing something wrong. What I'm doing for now with the subform record source is this, wich works, but makes me need different copies of the subform, :banghead: one for each main form:
SELECT * FROM [Detalles Factura Emitida]
WHERE Fecha Between forms!cuadrante!desde And forms!cuadrante!hasta
Note: in this case, the main form's name is "Cuadrante".
The code I have tested:
SELECT * FROM [Detalles Factura Emitida]
WHERE Fecha Between parent!desde And parent!hasta
It just shows no records. I also tried this another method, with the same result:
SELECT * FROM [Detalles Factura Emitida]
WHERE Fecha >= parent!desde and fecha <= parent!hasta
Any ideas of how could I make this? :help
Thanks