Results 1 to 2 of 2
  1. #1
    rwahdan@gmail.com is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2015
    Posts
    28

    Cool update record after select statement

    Hi,

    I did the following to get some operations done but since i did the selection, i stored one field value to string so i can update it, how is that done?

    Code:
       Set dbsNorthwind2 = CurrentDb
       Set rstShippers2 = dbsNorthwind2.OpenRecordset("Units")
    
    
       rstSQL = "SELECT * FROM Units WHERE UnitID =" & msg & ""      
       Set rstShippers2 = dbsNorthwind2.OpenRecordset(rstSQL)
       
       rstUnitNumber = rstShippers2!UnitNumber
       rstUnitType = rstShippers2!UnitType
       rstLocationFloor = rstShippers2!LocationFloor
       IsOccupied = rstShippers2!IsOccupied                            this one i need to update, the rest i used to add to new table
    Thanks,
    Rami

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    What exactly are you trying to update here.

    You haven't altered the recordset so I'm assuming it's the isoccupied

    Is this a textbox on a form?

    More details please.


    Sent from my iPhone using Tapatalk

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Should I /can I use a Select Case statement?
    By Gina Maylone in forum Access
    Replies: 1
    Last Post: 12-13-2014, 12:08 PM
  2. Replies: 1
    Last Post: 10-29-2014, 10:19 AM
  3. Help with Select Case statement
    By focosi in forum Access
    Replies: 4
    Last Post: 08-09-2011, 12:01 AM
  4. Need a select statement
    By gahawy in forum Queries
    Replies: 5
    Last Post: 01-15-2011, 04:02 PM
  5. select statement
    By jellybeannn in forum Access
    Replies: 5
    Last Post: 08-13-2010, 05:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums