Results 1 to 2 of 2
  1. #1
    Banzai_Bundy is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Mar 2014
    Posts
    1

    The first cell (A1) in the output table of my make table query is blank

    I constructed a query which checks a list of locations against two other tables in order to find out if the location has a record of a specific type of maintenance, and if so, when that maintenance was most recently performed. The output table contains the location ID and the most recent maintenance date. I manually compared the dates in the output table and the database to confirm that the query runs correctly. Everything seems fine, except that the first cell in the output table, which should contain the first location ID, is blank. I would like to know if this is a result of my make table query (see the SQL statement below), or if there could be a setting I need to change in the query property sheet. This seems like an exceedingly simple problem, so I feel kind of silly asking the question, but I would appreciate the help.



    SELECT IIf([ERP_WCI].[MPFLAG]="Y" And [ERP_WMI].[MTYPE]="MPELV",[July_13_GWE].[LOC ID]) AS LOCID, Max(ERP_WMI.LOGDATE) AS MaxOfLOGDATE INTO [Most Recent WMI MPELV log date for wells with MPFLAG=Y]
    FROM (July_13_GWE INNER JOIN ERP_WMI ON July_13_GWE.[LOC ID] = ERP_WMI.LOCID) INNER JOIN ERP_WCI ON July_13_GWE.[LOC ID] = ERP_WCI.LOCID
    GROUP BY IIf([ERP_WCI].[MPFLAG]="Y" And [ERP_WMI].[MTYPE]="MPELV",[July_13_GWE].[LOC ID]);

    Output table:


    Location ID Max of Log Date
    10/18/2011
    U5-1084 3/5/2010
    U5-1089 3/5/2010
    U5-147 3/5/2010

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Why are you outputting to a table? Why not just use the query?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 10-16-2013, 01:39 AM
  2. Add a blank field through a make table Query
    By SaraBanu in forum Access
    Replies: 5
    Last Post: 08-30-2013, 06:12 AM
  3. Replies: 3
    Last Post: 01-10-2011, 10:31 AM
  4. Replies: 2
    Last Post: 10-27-2009, 07:09 AM
  5. Insert Query output into a table
    By ammu_sridhar in forum Programming
    Replies: 1
    Last Post: 06-12-2009, 01:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums