Results 1 to 5 of 5
  1. #1
    annux3 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    8

    Question Make table query type looses data

    Hello guys,

    I cannot understand why does query type "make table" loose fields data from just "select" query type.

    The code that access gives me looks like this:
    Code:
    SELECT STARMAN_AD_KATASTRIYKSUS.KATASTRITUNNUS, Esimene.*, STARMAN_EH_EHITIS_KATYKSUS.KAYK_ID INTO Finaalne
    FROM (Esimene LEFT JOIN STARMAN_EH_EHITIS_KATYKSUS ON Esimene.EHIT_ID = STARMAN_EH_EHITIS_KATYKSUS.EHIT_ID) LEFT JOIN STARMAN_AD_KATASTRIYKSUS ON STARMAN_EH_EHITIS_KATYKSUS.KAYK_ID = STARMAN_AD_KATASTRIYKSUS.ID;
    So when I just run this code as select, it gives me what I want aka everything from table "Esimene", KATASTRITUNNUS from table "STARMAN_AD_KATASTRIYKSUS" and also KAYK_ID from table STARMAN_EH_EHITIS_KATYKSUS
    What this does not do, is put all those fields into new table called "Finaalne", fields are just blank.

    I am so confused, does anybody has a clue what I might be doing wrong?

    Thank you in advance,
    Annu


    EDIT*

    Okay I will explain a little more, maybe the problem is related to previous actions.

    First I made a table out of this code:
    Code:
    SELECT EE.*, Starman_eh_ehitis_aadress.EHIT_ID INTO Esimene
    FROM EE LEFT JOIN Starman_eh_ehitis_aadress ON EE.ADR_ID = Starman_eh_ehitis_aadress.ADR_ID;
    This worked like a charm.

    Then I also wanted to make a table out of this code:



    Code:
    SELECT Esimene.*, STARMAN_EH_EHITIS_KATYKSUS.KAYK_ID INTO Teine
    FROM Esimene LEFT JOIN STARMAN_EH_EHITIS_KATYKSUS ON Esimene.EHIT_ID = STARMAN_EH_EHITIS_KATYKSUS.EHIT_ID;
    However this one made a table where field made from previous select and "make table" was also lost. aka now it made a table where Starman_eh_ehitis_aadress.EHIT_ID and STARMAN_EH_EHITIS_KATYKSUS.KAYK_ID are empty columns.

    So in the end I tried eveything with one query:
    Code:
    SELECT EE.*, STARMAN_AD_KATASTRIYKSUS.KATASTRITUNNUS
    FROM ((EE LEFT JOIN Starman_eh_ehitis_aadress ON EE.ADR_ID = Starman_eh_ehitis_aadress.ADR_ID) LEFT JOIN STARMAN_EH_EHITIS_KATYKSUS ON Starman_eh_ehitis_aadress.EHIT_ID = STARMAN_EH_EHITIS_KATYKSUS.EHIT_ID) LEFT JOIN STARMAN_AD_KATASTRIYKSUS ON STARMAN_EH_EHITIS_KATYKSUS.KAYK_ID = STARMAN_AD_KATASTRIYKSUS.ID;
    But this did not work at all - gave me a error "Type mismatch in expression"

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    it shouldn't. If you turn the select query into a make table qry, it should pull the exact same fields.

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    To be clear, when you say fields are blank, do you mean there are no records? or there are records but the fields are blank?

  4. #4
    annux3 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    8
    No records, just a column with a header.

  5. #5
    annux3 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    8
    Wait, never mind. There were just so many records, that I did not scroll down enough. I am so sorry, I am just an idiot.

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

Similar Threads

  1. Replies: 5
    Last Post: 01-27-2016, 06:16 PM
  2. Replies: 4
    Last Post: 10-01-2014, 03:59 PM
  3. Replies: 1
    Last Post: 05-24-2012, 03:29 AM
  4. Replies: 2
    Last Post: 08-06-2011, 12:19 PM
  5. change data type in make table query
    By jgelpi16 in forum Queries
    Replies: 2
    Last Post: 01-26-2011, 09:37 AM

Tags for this Thread

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