Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default UPDATE Query

Hi All,

I am using UPDATE query from Excel to Access.

I have 1000 rows with unique IDS ( same IDS in Access Database Table)

I need to UPDATE for 1000 IDS status. Right now I am using like this.

I want to know is there any better option to do this ??

For R = 4 To 1000

ID = Trim(Cells(R, "A").Value)
STS = Trim(Cells(R, "F").Value)

SQL = "UPDATE TRACKER SET TRACKER.STATUS = '" & STS & "'"
SQL = SQL & " WHERE ID = '" & ID & "'"

rs.Open SQL, db, adOpenDynamic, adLockOptimistic, adCmdText

Next R
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default UPDATE Query

You would be best to post this in:

comp.databeses.ms-access

They are more atuned to Access related issues even though it is connected to
Excel.

HTH


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default UPDATE Query

It depends on your set up and how your app works. But an option that
also have is:
- in the Access create a linked table (linked to the excel)
- create an update query that would update the other access table with
the values from the linked table - the join would be the IDs that you
mention.



On Jan 13, 11:29*pm, "fi.or.jp.de" wrote:
Hi All,

I am using UPDATE query from Excel to Access.

I have 1000 rows with unique IDS ( same IDS in Access Database Table)

I need to UPDATE for 1000 IDS status. Right now I am using like this.

I want to know is there any better option to do this ??

For R = 4 To 1000

ID = Trim(Cells(R, "A").Value)
STS = Trim(Cells(R, "F").Value)

SQL = "UPDATE TRACKER SET TRACKER.STATUS = '" & STS & "'"
SQL = SQL & " WHERE ID = '" & ID & "'"

rs.Open SQL, db, adOpenDynamic, adLockOptimistic, adCmdText

Next R


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UPDATE Query fi.or.jp.de Excel Worksheet Functions 0 July 13th 09 07:54 PM
update DB via MS Query from WS Gaylen Excel Discussion (Misc queries) 4 April 3rd 09 03:38 PM
Update Query Roger Bell New Users to Excel 1 October 11th 07 11:34 AM
Update Web Query rook Excel Discussion (Misc queries) 3 September 18th 07 05:06 PM
After Query Update Pete[_30_] Excel Programming 0 March 14th 07 07:59 PM


All times are GMT +1. The time now is 09:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"