Search results

  1. C

    Select Case Statement

    what are you trying to achieve? "I am trying to get the code to find the best coverage match from TableC2 (TC2) based on months or miles when compared to TableC1's (TC1) INSM (month) or miles for each VIN when the Order equals A, B, C or D." What is the logic that the code is supposed to...
  2. C

    Select Case Statement

    Okay, I changed the code. It now reads each VIN on TableC1 and copies to the COVERAGE table, but it does not go through the logic. That is, it assigned all the same coverage; there is 1 that should be different (VIN 34523N1CN7AP0EL822619572960A should have coverage PWRTRN). Attached is the...
  3. C

    Select Case Statement

    Each Case is to test the months and mileage for each VIN in TableC1 against TableC2 to find the best coverage from TableC2. A, B, C, and D is an order to process the possibilities through to determine the best coverage. I set the Case's in descending order because I thought once the best...
  4. C

    Select Case Statement

    I am trying to write a select case statement module which using 3 tables; COVERAGE, TABLEC1 AND TABLEC2. The statement 1) anchors the distinct value from a table (TABLEC1), 2) goes through 4 select case scenarios based on TABLEC2 ORDER, 3) updates a table (COVERAGE) with the best result and 4)...
  5. C

    If-Then-Else or Case Statement

    You choose MONTHS for the max data; does it matter? Would MILEAGE also work? I assume that it is one or the other. After seeing what you did, I get it. Thank you very much! This is going to be a big time saver for me!
  6. C

    If-Then-Else or Case Statement

    Here is a database sample and the desired results
  7. C

    If-Then-Else or Case Statement

    I tried the suggested query against some actual data and did not get the desired OR " best" results. Attached is the database and a spreadsheet with the best results. when I ran your suggestion (qsPROGRAMMERS_SOLUTION), I got the correct results for 3 of the VINs. Based upon the results I am...
  8. C

    If-Then-Else or Case Statement

    First off, thanks for reviewing and simplifying my expression; I'll give it a try. I used A, B and C as an example; some of the actual coverage names are PWRTRN, CAFUEL, BASIC, etc. and change with the VIN, repair, etc. Based upon your suggestion, it appears that I do not need a series of...
  9. C

    If-Then-Else or Case Statement

    the best match would the one were the parameters in table1 fit the logic, i.e., one of table 1s months or mileage are greater than table 2s months or mileage. In my example, the best match is coverage C because table 1s mileage is greater than table 2's coverage C mileage, but less than table...
  10. C

    If-Then-Else or Case Statement

    I have 2 tables, table 1 and table 2. I am trying to find the best coverage match from table 2 for the vehicle (VIN) on table 1 based upon the VINs information in table 1. I have a serious of logic steps in an If-Then-Else format, but I am not sure of the proper verbiage/syntax or how to apply...
  11. C

    Parameter Query Question

    It provides another filtered layer to isolate the best FRF match. In this example, take the FRF's from the FRF_WITH_PNC (14004) and drilling down on the FRF_MASTER_NIS table, we are left with fewer options; add the model year, emission and VIN Prefix, and we are down to a couple.
  12. C

    Parameter Query Question

    Attached an example of the FRF AT306 and its various variables.
  13. C

    Parameter Query Question

    The combo box just allows the selection of the value for the POPCD field of the tblBuild table. Query1 will be based on that value as it gets it from the table. I'm probably not understanding your question. Could you elaborate? <The tables are a small fraction of their production tables and I...
  14. C

    Parameter Query Question

    My objective is to find the best coverage item code match and determine how many months &/or miles the vehicle is beyond those values. These items are found on the FRF_MASTER_NIS tables and are associated with the FRF_CD. To determine the FRF_CD, one needs 1) the first 5 characters of the...
  15. C

    Parameter Query Question

    Good suggestion and I will give it (them) a try. Regarding primary keys, you are right and my thought was to add them once it figure out what, which tables I will finally need. Question, by changing the op code to combo box, will that refresh to the query results all the time since they will...
  16. C

    Parameter Query Question

    My computer availability time is hit-and-miss at the moment; I will not be available for the next 5 hours.
  17. C

    Parameter Query Question

    All that is doing is decoding the VIN into various parts to query against the Master FRF table; the Emission delete and append is doing the same thing, but for emission data. All the queries work okay. The next section I am trying to incorporate is the model op code; my concern is if a user...
  18. C

    Parameter Query Question

    Sorry...forgot I had one...if you have any suggestions on streamlining or efficiency, then please comment...
  19. C

    Parameter Query Question

    I upload my data database (GPT_Test) and a mini set of testing info. The goal of the database is to provide a percentage amount due based upon the repair type that is outside of the vehicle warranty coverage. I have started filtering out the possibilities, but I am stuck on how to add the...
  20. C

    Parameter Query Question

    I'll upload the database...is it done via the "link?"
Top Bottom