Solved

Criteria Expressions

Posted on 2010-08-16
6
267 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now