Criteria For All Numbers Or Letters

Jan 18, 2008

Hello, I am a new member...thanks for any help anyone can provide.
I have a table with a column in which the fields will come in with various lengths and combinations of characters. I need to look up certain values from this field, and assign a value to another field based on that. For example if field1 begins with an "H*", then field2 will equal "INS".

My problem is that I need to write a statement saying something like if field1 starts with "H" and is followed by only numbers for any length, then assign field2 "blank"

so I cant use "H*" because that includes letters...and Ive tried criteria like "H[!a-z]*" but cant get anything to work(i know the last example only looks at the space after H) Does anyone have any ideas?

View Replies


ADVERTISEMENT

Queries :: Combination Of Letters And Numbers = Data Type Mismatch In Criteria Expression

May 16, 2013

I am working on a fairly ancient manufacturing database that identifies items using a combination of letters and numbers. The usual format is to have a letter (which suggests something about the item type) followed by a sequence of numbers.

I am trying to write a query that looks up all the records beginning with a prefix or arbitrary length, strips away the text, and finds the highest number.

Code:

SELECT Right(LocalID,Len(LocalID) - 1) As IDSuffix
FROM tblItemIDCrossReference
WHERE Left(LocalID,1) = 'T' AND IsNumeric(Right(LocalID,Len(LocalID) - 1)=True)

This query produces the error given in the title of this thread, whilst the following works:

Code:

SELECT Right(LocalID,Len(LocalID) - 1) As IDSuffix
FROM tblItemIDCrossReference
WHERE Left(LocalID,1) = 'T' AND IsNumeric(Right(LocalID,5)=True)

This related query also works and shows a load of -1s and 0s correctly

Code:

SELECT Right(LocalID,Len(LocalID) - 1) As IDSuffix,
IsNumeric(Right(LocalID,Len(LocalID) - 1)=True) As Alias
FROM tblItemIDCrossReference
WHERE Left(LocalID,1) = 'T' AND

But once again shows the error message when I try to filter the field Alias to -1 or 0 only through the right-click menu.I have tried piping Len(LocalID)-1 through CLng, CInt, Int, CDbl and CSng; this changes the error to 'Invalid Use Of Null' I have also tried removing the '=True' from the IsNumeric() term.

View 2 Replies View Related

Remove Letters From Numbers

Dec 15, 2005

Hello again.

I’m trying to find a way in a query to remove any data except for numbers

Examples


NET 90
NET 10
NET 10 DAYS
NET 110
NET 15


Any help would be greatly appreciated

Corey

View 5 Replies View Related

How To Show Letters And Not Numbers

Sep 16, 2015

In the attachment. I want to show the letters and not the numbers that is stated in step 4. How will I do this....

View 1 Replies View Related

Queries :: Order By Letters And Then Numbers

Dec 31, 2013

I have a column containing an id that consists of the first two letters of a weekday followed by an incrementing number. For example, for Monday, I have "MoA1" "MoA2" "MoA3" ... "MoA11".

The problem is that when I sort my list, it is ordering it: "MoA1" "MoA10" "MoA11" "MoA2" "MoA3" etc. Currently, my order by property is set to

MID(TABLENAME.SORTFIELDNAME, 3, LEN(TABLENAME.SORTFIELDNAME))

View 3 Replies View Related

Setting Field Criterias (numbers And Letters)

Feb 13, 2008

The data that is to be entered in the field "Rank", is either RK1, RK2 or RK3

How would I make the validation in a table make the user enter the format RK(Number), with only numbers from 1-3?

Thanks!

View 4 Replies View Related

Identifying Words Spelt Incorrectly With Numbers Instead Of Letters

Nov 15, 2007

Hello

I have some data I need to clean.
It is in an address field the majority of the data is fine but there are some records with words that have been spelt with numbers:

2 9RAMBLEGATE
2 Forest V1EW
2 KEM8LE Close
2 BELLEMOT4TE Road

Is it possible using a query to find instances where this has happened so I can flag these?

Any help would be greatly appreciated

Tim
:confused:

View 7 Replies View Related

Modules & VBA :: UDF In Excel Template - Turning Letters Into Numbers

Jun 12, 2015

I have this UDF in my excel template that changes a set of numbers in to letters corresponding a code.

For example the code is "EUCHARISTO" it would simply mean

E=1, U=2, C=3, H=4, A=5, R=6, I=7, S=8, T=9, O=0 and by default the tenths position (".0")=X the hundredths position (.0"0") = Y and If a number repeats it becomes G.

Examples
12.50 = EUAY
123.00 = EUCXY
12.25 = EUGA
99.00 = TGXY
99.50 = TGAY
999.00 = TGTXY
999.99= TGTGT

Here's the UDF:

Code:

Function LetterCode(ByVal Numbers As String, Letters As String) As String
Dim X As Long
Numbers = Format(Numbers, "0.00") * 100
Letters = UCase(Right(Letters, 1) & Left(Letters, Len(Letters) - 1))
If Numbers Like "*0" Then Mid(Numbers, Len(Numbers)) = "Y"

[Code] ...

Also, where best to put this code, In a query or in a module.

View 6 Replies View Related

General :: Query Criteria - Data In Fields Are Numbers

Nov 7, 2014

I have a query criteria where the data in the query field are numbers.

The following works as long as I have a value in the textbox otherwise I get an error message stating, this expression is typed incorrectly.

Code:
Like [FORMS]![FONMain]![txtTest15] Or [FORMS]![FONMain]![txtTest15] Is Null

Also tried

Code:
[FORMS]![FONMain]![txtTest15] Or [FORMS]![FONMain]![txtTest15] Is Null

Yet I use the following script for another column which has identical data and it works fine either way and I can use it in the other column and it works with or without data in the textbox

Code:
Like [Forms]![FONMain]![txtFact1] Or [Forms]![FONMain]![txtFact2]
Or [Forms]![FONMain]![txtFact3] Or [Forms]![FONMain]![txtFact4] Or [Forms]![FONMain]![txtFact5]
Or [Forms]![FONMain]![txtFact6] Or [Forms]![FONMain]![txtFact7] Or [Forms]![FONMain]![txtFact8]

[Code] .....

View 5 Replies View Related

Queries :: Search For Multiple Plot Numbers Preferably In One Parameter Prompt With Comma To Separate Numbers

Aug 12, 2014

I'm having multiple problems with my database like things such as -

i'm currently working on the Query 2 - On the Phone database (ignore Query 1) and i want to search for multiple plot numbers preferably in one parameter prompt with a comma to seperate numbers. (this could be a multitude of numbers so i would like to be able to input as many as needed). Also when i do search on this query since the Criteria is a 'Between' Value i would expect everything between the 2 numbers input to show up - but a lot of numbers out of the range show up too - why is this? (The Numbers are like "69 to 136" and they will show up - but 1-69 and 136-170 would too

I would also like to implement the search results from Query 2 into the Form i currently have made but it just opens up a access table when the search is made?

i cannot link my database as it is too big for the server - But here are the Criteria for Query 2:

Plot No - (criteria = Between [Enter First Plot No:] And [Enter Last Plot No:])
Site - (criteria = Like "*" & [Enter Site:] & "*")
Product - (criteria = Like "*" & [Enter Product:] & "*"

The Query is the one im most concerned about , i can live without a form.

View 14 Replies View Related

Numbers Stored As Text Convert To Numbers?

Jan 10, 2007

Ok so in excel I have some numbers that are stored as text. The reason being that they are zip codes and some begin with 0 and excel doesn't want numbers to start with 0....so when I import these into an access field that has an input mask for zip codes...will it convert these correctly since the field is a text with input mask?

View 1 Replies View Related

Modules & VBA :: Automate Line Numbers And PO Numbers

Aug 24, 2014

I have 2 fields that I would like to automate if possible

One field is called "p/o number" and another field called "line no"

These fields are part of an ordering database

Let say I have 200 items to purchase form 10 suppliers

And form example 20 items from each supplier

What I do at present is put the order number on each line item and the line number

example

p/o number line no

1 1
1 2
1 3

2 1
2 2
2 3
2 4

What I want to do is just put the first po number in the required line . Put the first line number in i.e. "1" and the macro will complete all the p/o numbers and line numbers for me as per the ones marked in red.

Example

1 1
2 2
3 3

2 1
2 2
2 3

View 5 Replies View Related

Letters

Aug 13, 2007

Hi

I am just wondering if there is any way that you can use access to input information into a letter

i.e. you could just click a command button and it would print a standard leter with the details from an address on access e.g. name etc

Thanks

View 10 Replies View Related

Capital Letters

Jun 25, 2007

Hi, I have an address database and in the zipcode/postcode box, i want all letters entered to go to capitals ie rj20 4ls would go to RJ20 4LS after update. how could i do this, what do i add to text boxes after updat?
Thanks

Alex

View 2 Replies View Related

Filtering Letters

Apr 20, 2007

How would I about filtering out all results that contain a letter in them? The entries are in a field called Code, and I only want to display the resources that don't have a letter in the code.

View 1 Replies View Related

WHERE First Three Letters Equal Xyz

Sep 21, 2007

Hi there,

I have one question with regards to the WHERE part of an SQL query. I want to limit my query on datasets, where the first three letters of a certain field (which contains strings) equal "Exp". Is there a more efficient way than the following?


SELECT A.Date, A.Name
From tblA as A
WHERE A.Name="Exp_A" OR A.Name="Exp_B" OR A.Name="Exp_C";


Best regards,
JapanFreak

View 3 Replies View Related

Letters In Access

Aug 31, 2005

We are in the process of converting from Lotus Approach to MS Access.
In Approach we could create letters that would add the fields we told it to.
We do not want to have to use the mail merge to Word. Can letters be created in Access?

View 2 Replies View Related

Getting First Letters Of Records

Nov 21, 2005

hello
I have a access DB with several names in a table. I need to get only the first letter of each name, but only one for each A, B, C, etc. For example, if I have 3 names starting with a A and 5 starting with the C, it will give me only 2 records, one with the letter A and other with the letter C. I'm using ASP with access database.

tks for the help.
Sneakky

View 11 Replies View Related

Seeking Help On Extracting Letters From Name

May 5, 2005

Hi all: MS Access 2003. I have two text fields family_name and given_name I need to extract 1st, 2nd & 5th letter of family_name along with 2nd & 3rd letter of given_name to form a link_key field. If either name has insufficient letters the missing letter is replaced by the numeral 2. Does anybody know how to help me acheive this please!

View 2 Replies View Related

How To Change Lowercase Letters?

Apr 19, 2007

Now,
I have a big table with sales data downloaded from DB2.
We have branches codes of 1 digit only.
Because of too many branches we have branch codes in upercase and lowercase. So Q ans q are different branches.
I'd like to substitute all lowercase codes like q with something like q_ to make them searchable.
How I can substitute all lowercase letters in one column of the large table in one shot?

Or may be you know any solution how to make Access queries sensitive to the case.

View 11 Replies View Related

Capital Letters In Text

Mar 16, 2005

Hi I'm new round here, and just wondering if anyone could shed some light on a few issues which I am trying to resolve in Access 2000.

Is it possible to make each word start with a capital letter even if the user inputs all the text in lower case,

for example:
user inputs: john smith

Desired display: John Smith


Any help much appreciated

Nick

View 10 Replies View Related

Primary Key Autonumber With Letters

Jun 25, 2007

Hi!
I am a new member of this forum and new to access.
I need to make a data base and I would to have my primary Key as an autonumber. I would like to use ID numbers that have already been assigned but they have letters in the beginning, they are GKAD0001 etc. so at the moment I just have them as text that wont allow duplicates, but really I would like them as and autonumber so when new data is added it automatically assigns the next number.
Is this possible?

Thankyou very much for your help.

View 2 Replies View Related

Taking Letters From A String

Feb 8, 2006

Hi all, I'm not sure if this is possible ...

I have a table which has contact details in it... two fields are FirstName and Surname. I want to create a new field called initials which takes the first letter from each of the former two fields. Is it possible to do this using an update query?

Or any other way maybe?

View 3 Replies View Related

Deleteing Lowercase Letters Only

Mar 2, 2006

I've been stumped on this and could use some help...

Fields in my table contains some words that are in uppercase and some in lowercase. I would like to delete all the lowercase letters and keep only the uppercase ones.

For example, if a field contains the following text:
CHLOROSULFONIC ACID with or without sulfur trioxide

I would like to change this to:
CHLOROSULFONIC ACID

Can this be done via an automated process?

Thanks!

View 7 Replies View Related

Can I Do Group By Query With Letters

Dec 20, 2007

ex
columns

Name Day1 Day2 Day3 Day4 Day5 Day6
Jackie s s
Jackie v v
Jackie p p


I would like to be combined into

Jackie s s p v v p

all in one row.

View 1 Replies View Related

Capital Letters At The Start

Nov 14, 2005

Hi all,

I am new to this game, so please bear with me...

I am creating a form in my database and would like to know if there is a way I can default each starting letter of my surname and address fields with a capital (but leave the rest in lower case)?
I feel that it looks more professional.

Many thanks for any help.

Mark

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved