Results 1 to 6 of 6
  1. #1
    davidj is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2016
    Posts
    4

    Update query to copy specific characters in fields

    I would like to design an update query to copy the information in the Valve Tag column to the Loop column, but I would only like to copy the numeric values.

    Click image for larger version. 

Name:	Capture.PNG 
Views:	9 
Size:	8.5 KB 
ID:	26603

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    If they're that consistent, you can use the Right() or Mid() functions. If the lengths could vary but the dashes always there, add InStrRev() to find the last dash.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    dljohn is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    May 2016
    Posts
    6
    The lengths of the entries do vary, but are consistent with the dashes. Would you mind showing me what this would look like by using an example from the snip of the table I posted? I am a new Access user, and not very keen on the specific things I need to put into the queries to have them operate properly.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Check out the InStrRev() and Mid() functions. Use the first in the starting position argument of the second.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    dljohn is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    May 2016
    Posts
    6
    I was speaking more towards using the query builder in Access...
    Not coding

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The functions can be used in a query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 02-23-2016, 08:36 PM
  2. Replies: 8
    Last Post: 10-29-2013, 12:13 PM
  3. Replies: 9
    Last Post: 06-21-2013, 08:22 PM
  4. Replies: 2
    Last Post: 06-04-2013, 07:57 AM
  5. Replies: 1
    Last Post: 10-29-2012, 08:15 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