Date Query

  • Thread starter Thread starter Steven Phillips via AccessMonster.com
  • Start date Start date
S

Steven Phillips via AccessMonster.com

Please HELP!!
I am running an efficiency query for employees and need to capture data
entered into a table between specified dates. I only enter a date for each
record entered in the table. My SQL is below, thanks in advance.

SELECT Personell.Supervisor, Personell.[ID#], Avg([Total Production
Efficiencies Query].[Production Efficiencies]) AS [AvgOfProduction
Efficiencies], Avg([Total Setup Efficiencies Query].[Setup Efficiencies])
AS [AvgOfSetup Efficiencies], [INPUT Daily Grinding Data].Date
FROM (([INPUT Daily Grinding Data] INNER JOIN Personell ON [INPUT Daily
Grinding Data].[ID#] = Personell.[ID#]) INNER JOIN [Total Production
Efficiencies Query] ON Personell.[ID#] = [Total Production Efficiencies
Query].[ID#]) INNER JOIN [Total Setup Efficiencies Query] ON Personell.
[ID#] = [Total Setup Efficiencies Query].[ID#]
GROUP BY Personell.Supervisor, Personell.[ID#], [INPUT Daily Grinding Data]
..Date
HAVING (((Personell.Supervisor)="Phillips") AND (([INPUT Daily Grinding
Data].Date) Is Not Null And ([INPUT Daily Grinding Data].Date) Between
[forms]![Input Daily Grinding Data]![start date] And [forms]![Input Daily
Grinding Data]![end date]));
 
I figured it out. i did not have the relationships set up correctly!!
Thanks anyway
 
You don't give us any info about what the problem is, but I'm going to guess
that ACCESS is confused because you're using Date as the name of a field.

Do not use Date as the name of a field. It and many other words are reserved
words in ACCESS, and can create serious
confusion for ACCESS and Jet. See these Knowledge Base articles for more
information:

List of reserved words in Access 2002 and Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;286335

List of Microsoft Jet 4.0 reserved words
http://support.microsoft.com/?id=321266

Special characters that you must avoid when you work with Access
databases
http://support.microsoft.com/?id=826763
 
Back
Top