Results 1 to 3 of 3

Thread: update queries, help needed please !

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    UK
    Posts
    300
    Hi Guys
    Thanks for taking the time to read.
    I am trying to make a update querie in access.
    Here's what I need to do, I have a table in access, the 3 fields I am working with are called:

    Invgrp : productgrp : and Unit

    Invgrp will have either 80 or 82 as the data ( as text )
    productgrp will have a two digit number as text such as 55 or 66 or 42 etc.
    and unit will have KG ( Unit of measure )

    first of all I need to combine the Invgrp and productgrp fields so I can read a four digit string. ie "8052"
    I have found out how to do this in an access querie.
    newfield: [Invgrp]&[productgrp]

    now I need to say if the combination of these fields ie newfield = 8055 or 8060 then change the value of unit field to "EA" instead of "KG"

    Is this clear ?

    hope you guys can help, remember this needs to be an update querie instaed of VBA code.

    Cheers , Locutus
    Resistance is futile

  2. #2
    New Member
    Join Date
    Nov 2000
    Posts
    15
    Go to View, SQL and try the next:

    UPDATE tblTable SET tblTable.Unit = "WHATEVERUWANT"
    WHERE ((([Invgrp] & [productgrp])="8055" Or ([Invgrp] & [productgrp])="8060"));

    Good luck

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    UK
    Posts
    300

    thanx

    that did the job nicely , cheers mate
    Resistance is futile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width