When I try to run my query, I get a message saying that
the query is typed incorrectly or too complex to be
evaluated. It works fine in an older version of the same
database, so why would it stop working correctly? Here is
the query:
SELECT *
FROM qryWindInfo
WHERE Date=Date()
ORDER BY Date;
This is a serious impediment to my team, because we need
to print daily reports, and if we can't do it then this is
useless to us. Plus a big waste of money because we spent
nine months developing this database.
Please, someone help with this problem!!!
-jay
--
Lynn Trapp
Programmer/Analyst
Wells Dairy, Inc.
rlt...@bluebunny.com
vincentj <vin...@SPAMSUX.clarkson.edu> wrote in message
news:3de101c14a85$7814f630$36ef2ecf@tkmsftngxa12...
Thanks, but it didn't work. Besides, the query works
exactly as written in another (older) copy of the database.
Any other suggestions?
>.
>
--
Lynn Trapp
Programmer/Analyst
Wells Dairy, Inc.
rlt...@bluebunny.com
vincentj <vinc...@SPAMSUX.clarkson.edu> wrote in message
news:0a2001c14a87$ddaac040$9ae62ecf@tkmsftngxa02...
theDate, Shift, Employee1, Employee2, Employee3,
Employee4, ShopOrder, Blocks, Percentage, Notes, DelayCodes
Both of my versions of the database are written in Access
97, but the other one is a months-old revision (so I can't
regress to the previous revision).
>.
>
If this doesn't help,
-does the query work if you try:
SELECT *
FROM qryWindInfo
-can you open qryWindInfo?
-Are there any other criteria perhaps in qryWindInfo?
-Have you checked your references from a module window?
Duane
"vincentj" <vin...@SPAMSUX.clarkson.edu> wrote in message
news:3de101c14a85$7814f630$36ef2ecf@tkmsftngxa12...
ACC2000: Reserved Words in Microsoft Access
http://support.microsoft.com/support/kb/articles/q209/1/87.asp
Regards,
Rachel Ceraul
Microsoft Support
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.
SELECT *
FROM qryWindInfo
WHERE [theDate] = Date()
ORDER BY [theDate];
but this DOES work (although it doesn't help me):
SELECT *
FROM qryWindInfo
WHERE [theDate] = #9/26/01#
ORDER BY [theDate];
And the references are set OK; the Date() function works
fine elsewhere in the database.
>.
>
I tried renaming the field and it doesn't work. Besides,
as I mentioned, the query works exactly as written in an
earlier revision of the database.
--
Lynn Trapp
Programmer/Analyst
Wells Dairy, Inc.
rlt...@bluebunny.com
vincentj <vinc...@NOSPAM.clarkson.edu> wrote in message
news:52c901c14a8a$2a13af80$19ef2ecf@tkmsftngxa01...
Duane
"vincentj" <vinc...@NOSPAM.clarkson.edu> wrote in message
news:272f01c14a8c$a1442880$b1e62ecf@tkmsftngxa04...
Anyway, here is the SQL statement for qryWindInfo.
Unfortunately, I this database was 5 months in development
before I started working on it, and the person that
started didn't know about normalization, so it's very
poorly designed. This is what I'm stuck with, and I know
it sucks. Well, here is the query:
SELECT ALL Date As theDate, Shift, Employee1, Employee2,
Employee3, Employee4, ShopOrder, Blocks, (Blocks/(IIf
(Employee1 Is Null,0,8)+IIf(Employee2 Is Null,0,8)+IIf
(Employee3 Is Null,0,8)+IIf(Employee4 Is Null,0,8))*100
& "%") As Percentage, Notes, DelayCodes
FROM tabBake
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabBlockandTie
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabBrazeCollectorEnd
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabBrazePhaseStraps
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabBrazeTurbineEnd
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabCappingCollectorEnd
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabCappingTurbineEnd
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabClean
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabConnRgs7FH2LU
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabHangRings
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabHipot
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabLowerHalfBottomBars
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabLowerHalfTopBars
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabLowerHalfWedge
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabSetupCollectorEnd
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabSetupTurbineEnd
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabShip
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabTapePhaseStraps
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabTurnovers
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabUpperHalfBottomBars
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabUpperHalfTopBars
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"")
UNION ALL SELECT Date As theDate, Shift, Employee1,
Employee2, Employee3, Employee4, ShopOrder, Blocks,
(Blocks/(IIf(Employee1 Is Null,0,8)+IIf(Employee2 Is
Null,0,8)+IIf(Employee3 Is Null,0,8)+IIf(Employee4 Is
Null,0,8))*100 & "%") As Percentage, Notes, DelayCodes
FROM tabUpperHalfWedge
WHERE Shift <>"" AND Blocks <> "" AND (Employee1<>"" OR
Employee2<>"" OR Employee3 <>"" OR Employee4 <>"");
--
Lynn Trapp
Programmer/Analyst
Wells Dairy, Inc.
rlt...@bluebunny.com
vincentj <vinc...@NOSPAM.clarkson.edu> wrote in message
news:47a401c14a91$22cc6b20$39ef2ecf@TKMSFTNGXA08...
>.
--
Lynn Trapp
Programmer/Analyst
Wells Dairy, Inc.
rlt...@bluebunny.com
vincentj <vinc...@NOSPAM.clarkson.edu> wrote in message
news:3eb001c14a9d$5e7150d0$36ef2ecf@tkmsftngxa12...
Visual Basic for Applications (VBA332.DLL)
Microsoft Access 8.0 Object Library (MSACC8.OLB)
Microsoft DAO 3.51 Object Library (DAO350.DLL)
Microsoft Windows Common Controls 6.0 (MSCOMCTL.OCX)
So I tried the "refresh the references" trick (which has
failed me before), and it worked, so now my problem is
mysteriously gone. Thanks for pointing me in the right
direction!
-Jason
>.
>
-Jason
>.
>
--
Lynn Trapp
Programmer/Analyst
Wells Dairy, Inc.
rlt...@bluebunny.com
vincentj <vinc...@clarkson.edu> wrote in message
news:3f6101c14aaf$d8f3e7c0$37ef2ecf@TKMSFTNGXA13...
Try removing parentheses that are not required
e.g. this one:
(...) As Percentage
and make sure you never open this query in design view again.
--
HomerDOS Error: (A)bort, (R)etry, (D)'OH!
"vincentj" <vinc...@NOSPAM.clarkson.edu> wrote in message
news:47a401c14a91$22cc6b20$39ef2ecf@TKMSFTNGXA08...
>..asp
>>
>>Regards,
>>Rachel Ceraul
>>Microsoft Support
>>
>>This posting is provided "AS IS" with no warranties, and
>confers no rights.
>>You assume all risk for your use. © 2001 Microsoft
>Corporation. All rights
>>reserved.
>>
>.
>