Results 1 to 3 of 3

Thread: Dlookup

  1. #1
    Star Lounger
    Join Date
    Feb 2001
    Location
    Wirral, Merseyside, Merseyside, England
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dlookup

    I want to lookup the value based on two sets of criteria.
    ie if field1 = one value and field2 = another then update field3 which must equal a value based on both fields.

    Currently I seem to be able to update all the records in a table rather than just one record.

    Any ideas!

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Dlookup

    Here's a rough cut at it since you weren't more specific.

    UPDATE tblWhatever As W Set W.Field3 = (W.Field1 * W.Field2) WHERE W.Field1 = 1 and W.Field2 = 2;
    Charlotte

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Dlookup

    Here's a rough cut at it since you weren't more specific.

    UPDATE tblWhatever As W Set W.Field3 = (W.Field1 * W.Field2) WHERE W.Field1 = 1 and W.Field2 = 2 and W.Field3 = 3;
    Charlotte

Posting Permissions

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