Exclude if last character alpha

B

Bonnie A

Good morning folks! Using A02 on XP. Wrote this up but got sidetracked and
my login expired so having to type again. Aargh! Hope I'm not double
posting.

We have contract numbers like GPXXXX where the X's are digits. Have a new
short term product with an alpha in the last spot (GPXXXA - A could be any
alpha character). How can I exclude them? I know how to do: Like "GP*" but
how to do it with any alpha at the last spot???

Thanks in advance for any help or advice. Luv U Guys!!!
 
K

KARL DEWEY

Add a field to the design view of your query like this --
Last_Char: Asc(Right([YourContractField],1))
User this as criteria --
Between 48 And 57
 
J

John Spencer

Like "GP*[!A-Z]"

Should get records that start with GP and end with any character that is not
a letter character. OR you could try
Like "GP*#"
which should return those that start with GP and end in a number character.

Note that those are not exclusive sets. The first one would return GP0000-,
because "-" is not between A and Z.
 
B

Bonnie A

Karl, I must admit I was mystified (doesn't take much) but tried your advice
and it worked! WHAT is Asc? I tried to look it up and got zip. Come clean
dude and share just a few words of explanation for my clueless self...please?
The 3 records with the last spot alpha had numbers above 57. What is this
Asc?

Thanks BUNCHES for the help!
--
Bonnie W. Anderson
Cincinnati, OH


KARL DEWEY said:
Add a field to the design view of your query like this --
Last_Char: Asc(Right([YourContractField],1))
User this as criteria --
Between 48 And 57

Bonnie A said:
Good morning folks! Using A02 on XP. Wrote this up but got sidetracked and
my login expired so having to type again. Aargh! Hope I'm not double
posting.

We have contract numbers like GPXXXX where the X's are digits. Have a new
short term product with an alpha in the last spot (GPXXXA - A could be any
alpha character). How can I exclude them? I know how to do: Like "GP*" but
how to do it with any alpha at the last spot???

Thanks in advance for any help or advice. Luv U Guys!!!
 
B

Bonnie A

Thanks John for your help. I really appreciate your time. Since my contract
numbers are restricted to the 6 spaces, I don't have any with hyphens so your
advice is right on time. Thanks a bunch!
--
Bonnie W. Anderson
Cincinnati, OH


John Spencer said:
Like "GP*[!A-Z]"

Should get records that start with GP and end with any character that is not
a letter character. OR you could try
Like "GP*#"
which should return those that start with GP and end in a number character.

Note that those are not exclusive sets. The first one would return GP0000-,
because "-" is not between A and Z.
 
K

KARL DEWEY

Asc stand for ASCII. That is the code that computer characters use. A very
similiar code is ANSI code. Asc finds the numerical code of a character
and Chr converts a number to a character.

Bonnie A said:
Karl, I must admit I was mystified (doesn't take much) but tried your advice
and it worked! WHAT is Asc? I tried to look it up and got zip. Come clean
dude and share just a few words of explanation for my clueless self...please?
The 3 records with the last spot alpha had numbers above 57. What is this
Asc?

Thanks BUNCHES for the help!
--
Bonnie W. Anderson
Cincinnati, OH


KARL DEWEY said:
Add a field to the design view of your query like this --
Last_Char: Asc(Right([YourContractField],1))
User this as criteria --
Between 48 And 57

Bonnie A said:
Good morning folks! Using A02 on XP. Wrote this up but got sidetracked and
my login expired so having to type again. Aargh! Hope I'm not double
posting.

We have contract numbers like GPXXXX where the X's are digits. Have a new
short term product with an alpha in the last spot (GPXXXA - A could be any
alpha character). How can I exclude them? I know how to do: Like "GP*" but
how to do it with any alpha at the last spot???

Thanks in advance for any help or advice. Luv U Guys!!!
 
B

BruceM

I can provide some explanation, but not all of the history. The ASCII
character set was developed as a standard way for information to be
exchanged between different computers and systems. There are 255 characters
in the extended ASCII character set. Some of the characters are
non-printing such as Tab and Enter, while others represent particular
letters and symbols. If you open a text editor such as Notepad (or any
number of other applications that accept keyboard input), then type Ctrl +
Num48 (that is to say, assure that your Number Lock is on (the light is lit
on your keyboard), then press and hold the Ctrl key while typing 48 on the
*Numeric Keypad*. Note that you can't use the numbers above the letter
keys. You should see the number 0 appear. If you type Ctrl + Num20 you
will see a paragraph mark (¶), and so forth. The non-printing characters
(characters 1-14, for instance) may produce something other than Tabs, etc.
(you may get smiley faces and the like, or nothing at all, depending on the
program), but the printing characters will probably work in the way
described.
Karl described one way (and quite a clean and simple way at that) of testing
the value of the rightmost character in a text field.

Bonnie A said:
Karl, I must admit I was mystified (doesn't take much) but tried your
advice
and it worked! WHAT is Asc? I tried to look it up and got zip. Come
clean
dude and share just a few words of explanation for my clueless
self...please?
The 3 records with the last spot alpha had numbers above 57. What is this
Asc?

Thanks BUNCHES for the help!
--
Bonnie W. Anderson
Cincinnati, OH


KARL DEWEY said:
Add a field to the design view of your query like this --
Last_Char: Asc(Right([YourContractField],1))
User this as criteria --
Between 48 And 57

Bonnie A said:
Good morning folks! Using A02 on XP. Wrote this up but got
sidetracked and
my login expired so having to type again. Aargh! Hope I'm not double
posting.

We have contract numbers like GPXXXX where the X's are digits. Have a
new
short term product with an alpha in the last spot (GPXXXA - A could be
any
alpha character). How can I exclude them? I know how to do: Like
"GP*" but
how to do it with any alpha at the last spot???

Thanks in advance for any help or advice. Luv U Guys!!!
 
B

Bonnie A

Hi Karl,

What is up with the newsgroup login blowing me off after just a few minutes
today!!! Ugh. This is my second attempt at thanking you and now I can't
remember the great comments I just made. Thank you VERY much for the
explanation. It turned on the light bulb.

--
Bonnie W. Anderson
Cincinnati, OH


KARL DEWEY said:
Asc stand for ASCII. That is the code that computer characters use. A very
similiar code is ANSI code. Asc finds the numerical code of a character
and Chr converts a number to a character.

Bonnie A said:
Karl, I must admit I was mystified (doesn't take much) but tried your advice
and it worked! WHAT is Asc? I tried to look it up and got zip. Come clean
dude and share just a few words of explanation for my clueless self...please?
The 3 records with the last spot alpha had numbers above 57. What is this
Asc?

Thanks BUNCHES for the help!
--
Bonnie W. Anderson
Cincinnati, OH


KARL DEWEY said:
Add a field to the design view of your query like this --
Last_Char: Asc(Right([YourContractField],1))
User this as criteria --
Between 48 And 57

:

Good morning folks! Using A02 on XP. Wrote this up but got sidetracked and
my login expired so having to type again. Aargh! Hope I'm not double
posting.

We have contract numbers like GPXXXX where the X's are digits. Have a new
short term product with an alpha in the last spot (GPXXXA - A could be any
alpha character). How can I exclude them? I know how to do: Like "GP*" but
how to do it with any alpha at the last spot???

Thanks in advance for any help or advice. Luv U Guys!!!
 
B

Bonnie A

Bruce,

Thanks for the more detailed explanation.

I really love the time all you guys give to the newsgroups. (I'm from New
England originally so I'm really including all genders here when I say
'guys'.)

Thanks!
--
Bonnie W. Anderson
Cincinnati, OH


BruceM said:
I can provide some explanation, but not all of the history. The ASCII
character set was developed as a standard way for information to be
exchanged between different computers and systems. There are 255 characters
in the extended ASCII character set. Some of the characters are
non-printing such as Tab and Enter, while others represent particular
letters and symbols. If you open a text editor such as Notepad (or any
number of other applications that accept keyboard input), then type Ctrl +
Num48 (that is to say, assure that your Number Lock is on (the light is lit
on your keyboard), then press and hold the Ctrl key while typing 48 on the
*Numeric Keypad*. Note that you can't use the numbers above the letter
keys. You should see the number 0 appear. If you type Ctrl + Num20 you
will see a paragraph mark (¶), and so forth. The non-printing characters
(characters 1-14, for instance) may produce something other than Tabs, etc.
(you may get smiley faces and the like, or nothing at all, depending on the
program), but the printing characters will probably work in the way
described.
Karl described one way (and quite a clean and simple way at that) of testing
the value of the rightmost character in a text field.

Bonnie A said:
Karl, I must admit I was mystified (doesn't take much) but tried your
advice
and it worked! WHAT is Asc? I tried to look it up and got zip. Come
clean
dude and share just a few words of explanation for my clueless
self...please?
The 3 records with the last spot alpha had numbers above 57. What is this
Asc?

Thanks BUNCHES for the help!
--
Bonnie W. Anderson
Cincinnati, OH


KARL DEWEY said:
Add a field to the design view of your query like this --
Last_Char: Asc(Right([YourContractField],1))
User this as criteria --
Between 48 And 57

:

Good morning folks! Using A02 on XP. Wrote this up but got
sidetracked and
my login expired so having to type again. Aargh! Hope I'm not double
posting.

We have contract numbers like GPXXXX where the X's are digits. Have a
new
short term product with an alpha in the last spot (GPXXXA - A could be
any
alpha character). How can I exclude them? I know how to do: Like
"GP*" but
how to do it with any alpha at the last spot???

Thanks in advance for any help or advice. Luv U Guys!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top