Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

where in recordset

Status
Not open for further replies.

samotek

Technical User
May 9, 2005
197
BG
I have the following recordset:

Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT Productid, code, categoryid,supplierid, size, ddu, grossprice,

office,cons,vip,dealer,pref ,bosch,drummer,oem,rig FROM products")

' fix office prices
rs.MoveFirst
Do
.............
I need to fix up the prices only in those cases where supplierid = 2.how can i change the recordset?
 
Code:
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset( _
   "SELECT Productid, code, categoryid,supplierid, _
           size, ddu, grossprice, office,cons,vip,dealer, _
           pref ,bosch,drummer,oem,rig _
   FROM products _
   [red]WHERE Supplierid = 2"[/red])

I don't know what you want to do to "fix up" the records but an UPDATE statement may be what you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top