R
ryguy7272
I posted this question in the Forms DG a few days ago. I though it was a
Forms question, because two values, two dates catually, were passed from a
Form to a Query. As I thought about it more and more, I began to realize
that this is a Query question, and I believe I need help with just one small
part of the SQL, which I can not, for the life of me, figure out! I’ve
looked at many posts on this DG, and all sorts of examples on the web, but I
can’t seem to find a solution anywhere.
Below is my SQL:
SELECT RM.SalesRegion, RM.SalesOffice, RM.SalesRep, RM.Advertiser,
RM.Advertiser1, RM.Agency, RM.IO, RM.IO_Start, RM.IO_End, RM.inventoryClass,
RM.CUR_MTD_REV, RM.JAN, RM.FEB, RM.MAR, RM.Q1, RM.APR, RM.MAY, RM.JUN, RM.Q2,
RM.JUL, RM.AUG, RM.SEP, RM.Q3, RM.OCT, RM.NOV, RM.DEC, RM.Q4, RM.TOTAL
FROM RM
WHERE (((RM.IO_Start) >= [forms]![Calendar].[IO_Start]) AND
((RM.IO_End)<=[forms]![Calendar].[IO_End]));
Basically, I have a Form set up, and it is linked to a Calendar. The
Calendar dates go into two TextBoxes just fine, but I can't seem to pass the
values from the TextBoxes to the QBE grid. It seems like, if the dates were
just listed in one Field, I could easily use the Between...And to handle the
issue, but there are actually two Fields, and they are named IO_Start and
IO_End. This seems to be presenting a problem. How can I pass the two dates
from my Form to my IO_Start Field and my IO_End Field? It must be something
in the Where part of the SQL, but I can't figure it out. Please assist.
Thanks,
Ryan---
Forms question, because two values, two dates catually, were passed from a
Form to a Query. As I thought about it more and more, I began to realize
that this is a Query question, and I believe I need help with just one small
part of the SQL, which I can not, for the life of me, figure out! I’ve
looked at many posts on this DG, and all sorts of examples on the web, but I
can’t seem to find a solution anywhere.
Below is my SQL:
SELECT RM.SalesRegion, RM.SalesOffice, RM.SalesRep, RM.Advertiser,
RM.Advertiser1, RM.Agency, RM.IO, RM.IO_Start, RM.IO_End, RM.inventoryClass,
RM.CUR_MTD_REV, RM.JAN, RM.FEB, RM.MAR, RM.Q1, RM.APR, RM.MAY, RM.JUN, RM.Q2,
RM.JUL, RM.AUG, RM.SEP, RM.Q3, RM.OCT, RM.NOV, RM.DEC, RM.Q4, RM.TOTAL
FROM RM
WHERE (((RM.IO_Start) >= [forms]![Calendar].[IO_Start]) AND
((RM.IO_End)<=[forms]![Calendar].[IO_End]));
Basically, I have a Form set up, and it is linked to a Calendar. The
Calendar dates go into two TextBoxes just fine, but I can't seem to pass the
values from the TextBoxes to the QBE grid. It seems like, if the dates were
just listed in one Field, I could easily use the Between...And to handle the
issue, but there are actually two Fields, and they are named IO_Start and
IO_End. This seems to be presenting a problem. How can I pass the two dates
from my Form to my IO_Start Field and my IO_End Field? It must be something
in the Where part of the SQL, but I can't figure it out. Please assist.
Thanks,
Ryan---