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

    Why are these inclcuded in the query when it is run?

    In the attached db please consider the query qryPersonnel. When I ran the query, I got two fields on the tail end of the results named Field1 and Field2. They are simply repeats of


    the fields that are already in the query. I am not sure what they are or why they are there. They are clearly not specified in the qryPersonnel or the tables that are used in the query. Exactly what is going on?

    Any help appreciated. Thanks in advance.

    Respectfully,

    Lou Reed
    Attached Files Attached Files

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    They are clearly not specified in the qryPersonnel
    I can see them as clear as day (and there are three, not 2). Why do you say they are not specified? You have in fact specified them twice, once by using tblPersonnel.* and again specifically. Since they are specified twice, Access (or any db for that matter) cannot use the same name twice, so uses default names Field0, Field1 and Field2. If you looked at the values returned rather than just the headings it would be very apparent what has happened

  3. #3
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Okay, thanks for your input it was clearly helpful. It is just a Monday morning and it just threw me. My first thought was whattha?

    Respectfully,

    Lou Reed

  4. #4
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    I am sorry, I just do not see it. I am including another db more current than the last one, that has the opposite problem. There are seven fields, but on the first four are shown. The last three : LastName, FirstName and is Deeleted are missing. what is going on?

    Respectfully,

    Lou Reed
    Attached Files Attached Files

  5. #5
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Is this what you are talking about? What is shown in this screenshot of the design view of qryPersonnel.

    What is shown here in the first column? tblPersonnel.*. Is this it.

    Is this what is casing all of this.

    Respectfully,

    Lou Reed
    Attached Files Attached Files

  6. #6
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    I have the answer to post 4. The boxes for the missing fields were unchecked. That is why they were not shown.

    Respectfully,

    Lou Reed

  7. #7
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Can someone answer post #5. I just do not see it. I am wondering how it was fixed in my db. It was fixed, but I think that I stumbled over it.

    Why is so much unnecessary stuff (fields) being shown. I did not explicitly ask for it, but it is there. I only asked for seven things, seven fields. I got s lot more than that.

    Any help appreciated. Thanks in advance.

    Respectfully,


    Lou Reed

  8. #8
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    I did not explicitly ask for it, but it is there
    you have asked for all fields in tblPersonnel (that is what tblPersonnel.* does) and then asked again for your specific fields - as explained in post #2. If you don't want to see all those additional columns, remove the tblPersonnel.* column

  9. #9
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Including, tblPersonnel.* , was a miskey or mistake. I would never have done that on purpose. It is too easy to make this keyboard error. That is what I thought it was when I looked closely at it.

    SO I changed tblPersonnel.* to PersonelID and everything was fine and dandy.

    As I said: it is to easy to make that miskey and then not realize that you did it.

    Thanks for your help.

    Respectfully,

    Lou Reed

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

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