?
Solved

Criteria Expressions

Posted on 2010-08-16
6
Medium Priority
?
317 Views
Last Modified: 2012-06-27
I have a list with two types of data.

1st Type: NO ALLOC. AVAIL. CONSTR.# 01068CRUH
2nd Type: NO ALLOC. AVAIL. CONSTR.# 00257

I want to write a expression that only gives me the 2nd type without the Letters on the end.

I tried
Between "NO ALLOC. AVAIL. CONSTR.# 00000" And "NO ALLOC. AVAIL. CONSTR.# 99999"

Did not work.  It still gave me the ones with the letters on the end.  Any suggestions?
0
Comment
Question by:mato01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 42

Expert Comment

by:dqmq
ID: 33448996
Please show exact syntax of  query using:
 
Between "NO ALLOC. AVAIL. CONSTR.# 00000" And "NO ALLOC. AVAIL. CONSTR.# 99999"

Reason I ask, is because that does not appear to be a valid VBA expression to me.
0
 
LVL 7

Expert Comment

by:shaydie
ID: 33449028
You could just test to see if the last char in the string is a number...

SELECT Table.tItem, IsNumeric(Right([tItem],1)) AS Item
FROM Table
WHERE (((IsNumeric(Right([tItem],1)))=True));
0
 

Author Comment

by:mato01
ID: 33449187
Here is the syntax fo query:

UPDATE [TBL ALL REPORTS] SET [TBL ALL REPORTS].COMMENTS = "Order will be Approved"
WHERE ((([TBL ALL REPORTS].REPORT)="CONSTRAINT") AND (([TBL ALL REPORTS].[ERROR MESSAGE]) Between "NO ALLOC. AVAIL. CONSTR.# 00000" And "NO ALLOC. AVAIL. CONSTR.# 99999"));
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 7

Accepted Solution

by:
shaydie earned 1000 total points
ID: 33449422
UPDATE [TBL ALL REPORTS] SET [TBL ALL REPORTS].COMMENTS = "Order will be Approved"
WHERE ((([TBL ALL REPORTS].REPORT)="CONSTRAINT") AND ((IsNumeric(Right([ERROR MESSAGE],1)))=True));
0
 
LVL 42

Expert Comment

by:dqmq
ID: 33449502
UPDATE [TBL ALL REPORTS] SET [TBL ALL REPORTS].COMMENTS = "Order will be Approved"
WHERE [TBL ALL REPORTS].REPORT="CONSTRAINT" AND
ISNUMERIC(right([TBL ALL REPORTS].[ERROR MESSAGE],1);
0
 
LVL 42

Expert Comment

by:dqmq
ID: 33449523
Better late than never :>)
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question