Results 1 to 4 of 4
  1. #1
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    Whta is wrong with this query

    Well, I guess if you cannot beat them, then you join them!
    The db that is in the file that I have attached works now on the frmPersonnel. There are no more green triangles in the upper corner. The method that I used was to simply export
    the query that works into the db that had the query that did not work.

    Then I did some renaming and everything is alright - it works now. The query that works is qryPersonnel and the query that does not work is qryPersonnel2, and they are both in the attached db.

    I am not sure why one works and the other does not. I just tried to open the frmPersonnel and it opened flawlessly with no problems by using the new query (which of course was renamed to the old query name) and the old nonworking query is now call qryPersonnel2. When I open frmPersonnel in design mode, the controls no longer had a green triangles in the upper left corner.



    I just have one question, and that is what is wrong with qryPersonnel2? Why does it fail to work? If one wants to try it is named now qryPersonnel2 or one on the previous posts in this thread had

    an attachment that was the whole malfunctioning db with the faulty query. One could also simply substitute qryPersonnel2 for qryPersonnel (remember that is the one that works).

    Then open fmPersonnel and you will see what I mean.

    I really hope this does not sound too complicated, but I tried to explain it simply.

    Any help appreciated. Thanks in advance.


    Respectfully,


    Lou Reed
    Attached Files Attached Files

  2. #2
    RayMilhon is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    Ok, Opened your Database both queries worked fine. Returned the same data set. although in the one I opened there was no qryPersonnel2 there was a qryPersonnel and a qryPersonnel1

  3. #3
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    I am sorry, it is qryPersonnel1 not QryPersonnel2!

    If you use qryPersonnel1 in place of qryPersonnel, (do not forget to rename them since the frmPersonnel is setup only one way) you will see my point.

    What I mean by the parenthetical expression is the form, frmPersonnel is only setup for qryPersonnel. So whichever query you use must be named qryPersonnel.

    Any help appreciated. Thanks in advance.

    Respectfully,

    Lou Reed
    Last edited by Lou_Reed; 04-06-2017 at 02:48 PM. Reason: correction

  4. #4
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    cboSelectPersonnel
    Change Rowsource to:
    Code:
    SELECT tblPersonnel.PersonnelID, [LastName] & ", " & [FirstName] AS FullName FROM tblPersonnel WHERE (((tblPersonnel.isDeleted)=False)) ORDER BY tblPersonnel.LastName, tblPersonnel.FirstName;
    Change the Bound Column property from 2 to 1
    Change Column Count from 1 to 2

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

Similar Threads

  1. What is wrong with this query
    By Lou_Reed in forum Access
    Replies: 4
    Last Post: 08-21-2015, 12:36 PM
  2. Query wrong sum
    By Mikey1987 in forum Access
    Replies: 6
    Last Post: 01-30-2015, 02:37 AM
  3. Please help: what is wrong with this query?
    By drhassan in forum Queries
    Replies: 4
    Last Post: 05-24-2012, 05:15 PM
  4. What's wrong with my query?
    By Grek in forum Queries
    Replies: 2
    Last Post: 10-31-2011, 12:12 PM
  5. What's wrong with this query?
    By jsoldi in forum Queries
    Replies: 2
    Last Post: 10-11-2010, 07:45 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