Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006

    Unanswered: Match parts of record


    I am having a little problem with a database which I am tring to create I have a table called tblshop1 and another table called tbltariffs. tblshop1 has a column called offer (this column has the phones, tariffs and offer) I want to match records from this coloumn to records in tbltariffs in a column call tarrifs using a query:

    The data in the offer column is in the following format:
    Motorola V3 black on O2 250 with 50 messages (24 mths)
    Motorola L6 + 17" LCD TV on T-Mobile Relax 35 (12 month)

    The column of tariffs has records such as:
    O2 250
    T-Mobile Relax 35

    I need to find out how I can get Microsoft access to match price plans such as "02 250" and "T-Mobile Relax 35" to records in the tarrifs column located in tbltariffs using QUERY. so i dont have to go through each record and select the price plan from the list box. I also want to match the records and display them seperately in a coloumn in tblshop1.

  2. #2
    Join Date
    Dec 2004
    Madison, WI
    Not sure how this would work out but you could try adding both of your tables to the query and then have a column (in addition to your Offer column): Exp: IIf(InStr([Offer],[Tarrifs]),True,False) with the criteria set to True. It might work. You'll need to set the query to distinct. That's the only way I can think of doing it in a query verses doing it with vba code. Only problem is you might get some records which match in the instr function which you don't want in the query but it may be worth a shot.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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