dbTalk Databases Forums  

Update Query

comp.databases.ms-access comp.databases.ms-access


Discuss Update Query in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
fi.or.jp.de
 
Posts: n/a

Default Update Query - 01-17-2011 , 05:53 PM






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 With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.