Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011

    Question Unanswered: [Ask] lookup in VB

    Dear Master,

    I have Access DB with 2 table, AWBILLand Compare
    and some field that related to this prolem is [awbill][picklist], [awbill][No Awb], [Compare][issNo] and [compare][awbno].

    this is the condition
    [awbill][picklist], [awbill][No Awb] is the array. if [Compare][issNo] same record with [awbill][picklist], [compare][awbno] = [awbill][No Awb]

    the condition is the same as vlookup on excel, can u give me advice how can i create that lookup in VB6
    Attached Thumbnails Attached Thumbnails Untitled.jpg  

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    JET uses SQL to manipulate data, usually seen in Access as queeries
    so what (I think) you are looking for is a query which links the two items

    the query will take the form of
    SELECT a, list, of, columns, from, your, tables FROM atable
    JOIN btable ON btable.somecolumn = atable.anothercolumn
    WHERE acondition=true
    ORDER BY some, columns

    so it comes down as to how you know the two tabels are interelated
    is picklist the same entity as issno?
    for this exercise lets assume they are

    SELECT a, list, of, columns, from, your, tables FROM compare
    JOIN awbill on awbill.picklist = compare.issno don't have to include a WHERE clause, but if you wanted to you could
    WHERE comapre.yrmth = 1103 don't have to include an ORDER BY clause, but often they are used to make the data easier to read
    ORDER BY trxdate

    incidentally yrmth is a seriusly kludgy column, especailly as ont he face of it its derived from the transaction date
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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