Use Excel to update Access tables

A

Angus

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.
 
V

vqthomf

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
 
A

Angus

hmmm...

I am not quite understand. Would you elaborate more...?

Should I add:

dim strSQL as string
....etc?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top