Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Help on comparing values

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-04-04, 03:52
sakuragi_85 sakuragi_85 is offline
Registered User
 
Join Date: Jun 2004
Posts: 7
Help on comparing values

Hi,

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.
Thankz

Last edited by sakuragi_85 : 06-04-04 at 04:19.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On