Results 1 to 1 of 1
  1. #1
    Join Date
    Jun 2004

    Unanswered: Help on comparing values


    I'm using Microsoft Access 2000 and I need some help with the sql commands.
    I have a database with a table [main table] and a field [code] in it(without the square brackets). The format of [code] is: **/*/**/?? where the asterisks represent alphabets and the question mark represents numbers(eg. QW/E/RT/12). I've created a form with a comboBox to allow the user to select the code without the numbers(QW/E/RT). After selecting the code, the user will click on the display button and a report will be displayed with the results. So if i select QW/E/RT, results with QW/E/RT in front will be shown.

    The problem I'm facing now is that there's no result being displayed in the report. In other words, somethin is wrong with my query. I believe that the problem is in my WHERE statement as it works perfectly fine w/o them. Anyway i only have e SELECT, FROM, WHERE and ORDER BY clause in my command. But I just cant figure out what went wrong with it and have been figurin it out for days.

    These r 2 of e WHERE statements I've tried:
    1) WHERE ([main table].[code] LIKE '[[[Forms]![current code]![cbxCode]][*]]') /* no result shown in report*/

    2)WHERE ([main table].[code] LIKE '[(CONCATENATE((MID("selectedCode", 1, 2)),"/", (MID("selectedCode", 4, 1)), "/", ((MID("selectedCode", 6, 2)))]' & '*') /* displays all results with **/M/**. I'm trying to select the location of the alphabets which r so call more relevant with the [code].

    hopefully my explanations r clear enough n some1 is able to help me.
    Last edited by sakuragi_85; 06-04-04 at 03:19.

Posting Permissions

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