Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Angus
I use an sql string something like this by sending the record number from column A HTH Charles Sub Deactivate(RcdID As Integer) ' strSQL = "Select Active" strSQL = strSQL & " From " & GetFromIniFile("QueriesTables", "Data", strIniFile) strSQL = strSQL & " Where id=" & RcdID & ";" cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & GetFromIniFile("dBPath", "dBBudget", strIniFile) & GetFromIniFile("dBNames", "dBReviseBudget", strIniFile) rst.Open strSQL, cnn, adOpenStatic, adLockOptimistic On Error Resume Next rst.Fields(0).Value = False rst.Update cnn.Close Set rst = Nothing Set cnn = Nothing On Error GoTo 0 "Angus" wrote: I got a query which extract data from Access table. Column A is a auto-created key from Access table: Column A Column B 123 124 125 126 How do I update data in column B and update the data in column B to Access table, according to key in column A? Thanks all. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hmmm...
I am not quite understand. Would you elaborate more...? Should I add: dim strSQL as string ....etc? "vqthomf" wrote: Hi Angus I use an sql string something like this by sending the record number from column A HTH Charles Sub Deactivate(RcdID As Integer) ' strSQL = "Select Active" strSQL = strSQL & " From " & GetFromIniFile("QueriesTables", "Data", strIniFile) strSQL = strSQL & " Where id=" & RcdID & ";" cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & GetFromIniFile("dBPath", "dBBudget", strIniFile) & GetFromIniFile("dBNames", "dBReviseBudget", strIniFile) rst.Open strSQL, cnn, adOpenStatic, adLockOptimistic On Error Resume Next rst.Fields(0).Value = False rst.Update cnn.Close Set rst = Nothing Set cnn = Nothing On Error GoTo 0 "Angus" wrote: I got a query which extract data from Access table. Column A is a auto-created key from Access table: Column A Column B 123 124 125 126 How do I update data in column B and update the data in column B to Access table, according to key in column A? Thanks all. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I access the access data via Excel 2002 with auto update ? | Excel Programming | |||
How to update ms access tables directly from ms excel? | New Users to Excel | |||
export access to excel. change access & update excel at same time | Excel Discussion (Misc queries) | |||
Using qry from excel to update tables in a db2 database | Excel Programming | |||
Using qry from excel to update tables in a db2 database | Excel Programming |