Solved

Criteria Expressions

Posted on 2010-08-16
6
310 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

738 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