Solved

Criteria Expressions

Posted on 2010-08-16
6
291 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
  • 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 250 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
This collection of functions covers all the normal rounding methods of just about any numeric value.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

831 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