Docmd runsql not updating

Run SQL "DELETE * FROM tbl QNImport" Call mod Excel. Worksheets(Work Sheet) Set obj Range = obj Worksheets. Path & "\" & Excel File Name, True, obj Worksheets. Run SQL str SQL str SQL = _ "INSERT INTO " & _ "tbl QNTasks ( QN, Dept, Tasked, Name, Task, [Est Comp], [Task Days Old], Age ) " & _ "SELECT " & _ "tbl QNImport. Another strange effect is that if the following code snippet is removed: Do Cmd. Path & "\" & Excel File Name Set obj Workbook = obj Excel. Open(str File Name) Set obj Worksheets = obj Workbook. Transfer Spreadsheet ac Import, ac Spreadsheet Type Excel9, Table Name, Current Project. form there i wanted to group/quiery on for agent counts and then agent volume.i was going to put these in to a historical agent coutn table and then a historical agetn volume table.I have a table that I need to add data to based on criteria within other fields within the same table.More specifically, my table Condensed DTFImport Named contains a Add NLSDesc field.

These changes will usually be adding, deleting or updating records.

The groupings within the Add NLSDesc field are NEW, LOST, SAME, ZERO.

I want to reclassify those where Add NLSDesc = ZERO as INACTIVE if: 1) Condensed DTFImport Named. Agnt End = Is Not Null NOTE: These agents that are ACTIVE and have an end date 2) Condensed DTFImport Named. Agnt End = 0 NTOE: These agents that are DISCONNECTED and DO NOT have an end date 3) Condensed DTFImport Named. Agnt End = Is Not Null NOTE: These agents that are DISCONNECTED and have an end date My attempt to complete this task was to create 3 queries (qry_Zero_A_Agnt_End Date Exist, qry_Zero_D_Agnt_End Date, qry_Zero_D_Agnt_End Date Exist). Set Warnings False Set db = Current Db Set rs = db. EOF str AGNTID = fld Dim Inactive Sql As String Inactive Sql = "Update DTFImport Named " & _ "SET DTFImport Named. Move Next Loop End With Set rs = Nothing Set fld = Nothing Set flsa = Nothing Do Cmd. Set Warnings False Set db = Current Db Set rs = db. EOF str AGNTID = fld Dim Inactive Sql As String Inactive Sql = "Update DTFImport Named " & _ "SET DTFImport Named. Move Next Loop End With Set rs = Nothing Set fld = Nothing Set flsa = Nothing Do Cmd. Set Warnings False Set db = Current Db Set rs = db. EOF str AGNTID = fld Dim Inactive Sql As String Inactive Sql = "Update DTFImport Named " & _ "SET DTFImport Named. Move Next Loop End With Set rs = Nothing Set fld = Nothing Set flsa = Nothing Do Cmd. My skills are somewhat limited so I would be surprised If I made this more difficult that it needs to be.

from there i used sql statements to update these fields in tbl_Condensed_DTF_Named.

so for example i evaluate a NLSDesc usign the CY and PY monthly totals..

Search for docmd runsql not updating:

docmd runsql not updating-6

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “docmd runsql not updating”