Recent content by mikke3141

  1. M

    Append multiplying generated records

    Hi, Then the Month_ID field in the headcount table becomes blank. Mikke
  2. M

    Append multiplying generated records

    Hi, I'm trying to insert into my headcount table new persons with the following code. INSERT INTO HeadCountTbl (HeadCount, EmpID, Month_ID ) SELECT 1, HeadCountTbl.EmpID, HeadCountTbl.Month_ID FROM MonthTbl INNER JOIN HeadCountTbl ON MonthTbl.ID = HeadCountTbl.Month_ID WHERE...
  3. M

    Creating a SQL query from access

    You are the best Arnelgp :) Easy solution, but I was just too dumb to see it :banghead:
  4. M

    Creating a SQL query from access

    Well just to clarify I removed the joins SQL_string = "UPDATE CountryTbl INNER JOIN EmployeeTbl ON CountryTbl.CountryID = EmployeeTbl.Country_ID SET EmployeeTbl.Country_ID = DLookup(CountryTbl.CountryID, 'CountryTbl', (CountryTbl.Country)='Italy') WHERE (((EmployeeTbl.EmpID)=1234));" This code...
  5. M

    Creating a SQL query from access

    Thank you DBguy, your solution is updating the field in question. SQL_string = "UPDATE (ManagerTbl INNER JOIN CCTbl ON ManagerTbl.ManID = CCTbl.Manager_ID) INNER JOIN (ColAgrTbl INNER JOIN " & _ "(LocationTbl INNER JOIN ((CountryTbl INNER JOIN (ContractTbl INNER JOIN EmployeeTbl ON...
  6. M

    Creating a SQL query from access

    I want to change the country of employee 1234 in EmployeeTbl to Italy using the Country information that is located in the linked table of CountryTbl. Basically after the update the EmployeeTbl would contain the Country key of Italy. At the moment of update I do not know the country key number...
  7. M

    Creating a SQL query from access

    Italy is not the criteria, but the value that I want to enter to the employee table for the employee with number 1234. And Italy word is not in the employee table, but in the Country table that is linked to the employee table ([CountryTbl].[CountryID]=[EmployeeTbl].[Country_ID]. How can it be done?
  8. M

    Creating a SQL query from access

    Hi, I am trying to generate a SQL-string from Access to make a UPDATE from excel to the Access database. UPDATE CountryTbl INNER JOIN EmployeeTbl ON CountryTbl.CountryID = EmployeeTbl.Country_ID SET EmployeeTbl.Country_ID = "Italy" WHERE (((EmployeeTbl.EmpID)=50)); This will of course not...
Top Bottom