Results 1 to 6 of 6
  1. #1
    RayMilhon is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,067

    Weird Query issue

    I have a query based on 2 other Queries.



    Code:
    SELECT Query1.PROVIDER, Query1.MEMBER, Query1.MEMBID, query2.DATEFROM, query1.[PROCEDURES AUTHORIZED], query2.PROCCODE, query2.AUTHNO, query2.CLAIMNO
    FROM query2 INNER JOIN query1 ON (query2.MEMB_KEYID = query1.MEMB_KEYID) AND (query2.PROV_KEYID = query1.PROV_KEYID) AND (query2.AUTHNO = query1.AUTHNO);
    Query 1 has a date field that is set to pull all records Greater than or equal to 01/01/2016 The parameter is hardcoded in the query. If I run query1 I get no prompt. However, on the query above I get prompted repeatedly to enter the parameter for that field.

    Query 1:

    Code:
    SELECT dbo_PROV_VENDINFO.VENDOR, dbo_PROV_COMPANY_V.PROV_KEYID, dbo_PROV_COMPANY_V.REV_FULLNAME AS PROVIDER, dbo_MEMB_COMPANY_V.MEMB_KEYID, dbo_MEMB_COMPANY_V.REV_FULLNAME AS MEMBER, dbo_MEMB_COMPANY_V.MEMBID, dbo_AUTH_MASTERS_V.REQDATE, dbo_AUTH_MASTERS_V.AUTHDATE, dbo_AUTH_MASTERS_V.EXPRDATE, dbo_AUTH_DETAILS_V.PROCCODE AS [PROCEDURES AUTHORIZED], dbo_AUTH_MASTERS_V.AUTHNO, dbo_AUTH_MASTERS_V.STATUS
    FROM ((((dbo_AUTH_MASTERS_V INNER JOIN dbo_AUTH_DETAILS_V ON dbo_AUTH_MASTERS_V.AUTHNO = dbo_AUTH_DETAILS_V.AUTHNO) INNER JOIN dbo_MEMB_COMPANY_V ON dbo_AUTH_MASTERS_V.MEMB_KEYID = dbo_MEMB_COMPANY_V.MEMB_KEYID) INNER JOIN tbl_HPCODEs ON dbo_MEMB_COMPANY_V.HPCODE = tbl_HPCODEs.HPCODE) INNER JOIN dbo_PROV_COMPANY_V ON dbo_AUTH_MASTERS_V.REQPROV_KEYID = dbo_PROV_COMPANY_V.PROV_KEYID) INNER JOIN dbo_PROV_VENDINFO ON dbo_PROV_COMPANY_V.PROV_KEYID = dbo_PROV_VENDINFO.PROV_KEYID
    WHERE (((dbo_PROV_VENDINFO.VENDOR)="3613") AND ((dbo_AUTH_MASTERS_V.REQDATE)>=#1/1/2016#) AND ((dbo_AUTH_MASTERS_V.STATUS)="1"))
    ORDER BY dbo_PROV_COMPANY_V.REV_FULLNAME, dbo_MEMB_COMPANY_V.REV_FULLNAME;
    As you can see all of the where conditions are hard-coded. No need for parameters as this is a one time request for a specific vendor. Any idea why I would get prompted for this?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Does query2 have similar parameters? Perhaps the prompts come from there.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    RayMilhon is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,067
    No The prompt message clearly shows Query1.REQDATE as the field being prompted for. Also query2 does not contain that field at all.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    That is certainly odd, since it isn't even in the SELECT list of the final query. Can you attach a sample db that does this?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    RayMilhon is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,067
    Still not sure what was going on but had to do a reboot of the computer for other reasons and that error went away. Query runs as it should now.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Weird. Well, the IT guy's rule-of-thumb: rebooting solves 90% of the problems.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Weird Sorting Issue
    By MattPGA in forum Access
    Replies: 6
    Last Post: 07-17-2017, 12:33 PM
  2. Weird Query error
    By RayMilhon in forum Queries
    Replies: 2
    Last Post: 11-15-2016, 02:33 PM
  3. Weird Issue with forms
    By newbieaccess203 in forum Queries
    Replies: 3
    Last Post: 01-12-2016, 02:46 PM
  4. Weird Speed issue
    By devlin7 in forum Access
    Replies: 12
    Last Post: 02-09-2014, 07:32 PM
  5. Weird Query results
    By UCBFireCenter in forum Queries
    Replies: 0
    Last Post: 10-06-2009, 03:38 PM

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