R
rollover99 via AccessMonster.com
I am having an issue. I many databases that are linked ODBC. I have created
a query that I am trying to get the between date function to work. At first
I got an 'ODBC - Call Failed' Error 3146 so I tried formatting the date to a
short date via Format([Dates],"Short Date") this works in getting me one
step forward. In a new query I write the statement Between [start] and [end]
to limit the output of records, but get all records. My question is how do I
get the records to only show between the start date and the end date. I have
looked at many threads on this to no aveil. I have attached the SQL for both
queries. Any input would be appreciated.
SELECT Format([Invoices all]![Date],"Short Date") AS Dates, [Invoices all].
[Invoice#], [Invoices all].[Rot#], [Invoices all].[Sold by], [Invoices all].
[Entered by], [Invoices all].Prgm, [Invoices all].[Bill To], company.
COMPANYNAME AS Company, [Invoices all].PN, [Invoices all].DESCRIPTION AS
[Desc], [Invoices all].Type, [Invoices all].Qty, [Invoices all]!Qty*[Invoices
all]!Cost AS Amount, [Invoices all].Pool, [Invoices all].CLF
FROM [Invoices all] INNER JOIN company ON [Invoices all].[Bill To] = company.
ID;
SELECT Query1.*
FROM Query1
WHERE (((Query1.Dates) Between [start] And [end]));
a query that I am trying to get the between date function to work. At first
I got an 'ODBC - Call Failed' Error 3146 so I tried formatting the date to a
short date via Format([Dates],"Short Date") this works in getting me one
step forward. In a new query I write the statement Between [start] and [end]
to limit the output of records, but get all records. My question is how do I
get the records to only show between the start date and the end date. I have
looked at many threads on this to no aveil. I have attached the SQL for both
queries. Any input would be appreciated.
SELECT Format([Invoices all]![Date],"Short Date") AS Dates, [Invoices all].
[Invoice#], [Invoices all].[Rot#], [Invoices all].[Sold by], [Invoices all].
[Entered by], [Invoices all].Prgm, [Invoices all].[Bill To], company.
COMPANYNAME AS Company, [Invoices all].PN, [Invoices all].DESCRIPTION AS
[Desc], [Invoices all].Type, [Invoices all].Qty, [Invoices all]!Qty*[Invoices
all]!Cost AS Amount, [Invoices all].Pool, [Invoices all].CLF
FROM [Invoices all] INNER JOIN company ON [Invoices all].[Bill To] = company.
ID;
SELECT Query1.*
FROM Query1
WHERE (((Query1.Dates) Between [start] And [end]));