Is there a way to make access ignore punctuation at the beginning of
an item, such as "Field and Stream" so that it will arrange all
information alphabetically instead of arranging items in quotes
alphabetically, and then arranging items not in quotes
alphabetically?
Thanks 4 2774
I'm not sure if you want to use a query, but this query will do what
you want.
SELECT Table.name
FROM Table
ORDER BY IIf(Left(Table. name,1)='"',Rig ht(Table.name,L en(Table1.name)-
InStr(Table.nam e,'"')),Table.n ame);
Function StripQuotes(MyS tr As Variant) As Variant
On Error GoTo StripQuotesErro r
Dim strChar As String, strHoldString As String
Dim i As Integer
' Exit if the passed value is null.
If IsNull(MyStr) Then Exit Function
' Exit if the passed value is not a string.
If varType(MyStr) <8 Then Exit Function
' Check each value for invalid characters.
For i = 1 To Len(MyStr)
strChar = Mid$(MyStr, i, 1)
Select Case strChar
Case """"
' Do nothing
Case Else
strHoldString = strHoldString & strChar
End Select
Next i
' Pass back corrected string.
StripQuotes = strHoldString
StripQuotesEnd:
Exit Function
StripQuotesErro r:
MsgBox Error$
Resume StripQuotesEnd
End Function
=============== =====
In a query:
(AirCode)
SELECT tblMagazines.*, StripQuotes([MagazineTitle]) AS MyTitle
FROM tblMagazines
ORDER BY StripQuotes([MagazineTitle]);
--
--
HTH,
Don
=============== ==============
E-Mail (if you must) My*****@Telus.n et
Disclaimer:
Professional PartsPerson
Amateur Database Programmer {:o)
I'm an Access97 user, so all posted code samples are also Access97- based
unless otherwise noted.
=============== =============== =============== =============== ==============
<kh******@yahoo .comwrote in message
news:11******** ************@p1 5g2000hsd.googl egroups.com...
Is there a way to make access ignore punctuation at the beginning of
an item, such as "Field and Stream" so that it will arrange all
information alphabetically instead of arranging items in quotes
alphabetically, and then arranging items not in quotes
alphabetically?
Thanks
Oops ... forgot to pay the Devil his dues :)
This is simply an adaptation of the StripString() function from http://support.microsoft.com/default...b;en-us;138774
"Don Leverton" <le************ ****@telusplane t.netwrote in message
news:qNUOh.2822 6$x9.11584@edtn ps89...
Function StripQuotes(MyS tr As Variant) As Variant
On Error GoTo StripQuotesErro r
Dim strChar As String, strHoldString As String
Dim i As Integer
' Exit if the passed value is null.
If IsNull(MyStr) Then Exit Function
' Exit if the passed value is not a string.
If varType(MyStr) <8 Then Exit Function
' Check each value for invalid characters.
For i = 1 To Len(MyStr)
strChar = Mid$(MyStr, i, 1)
Select Case strChar
Case """"
' Do nothing
Case Else
strHoldString = strHoldString & strChar
End Select
Next i
' Pass back corrected string.
StripQuotes = strHoldString
StripQuotesEnd:
Exit Function
StripQuotesErro r:
MsgBox Error$
Resume StripQuotesEnd
End Function
=============== =====
In a query:
(AirCode)
SELECT tblMagazines.*, StripQuotes([MagazineTitle]) AS MyTitle
FROM tblMagazines
ORDER BY StripQuotes([MagazineTitle]);
--
--
HTH,
Don
=============== ==============
E-Mail (if you must) My*****@Telus.n et
Disclaimer:
Professional PartsPerson
Amateur Database Programmer {:o)
I'm an Access97 user, so all posted code samples are also Access97- based
unless otherwise noted.
=============== =============== =============== =============== ==============
<kh******@yahoo .comwrote in message
news:11******** ************@p1 5g2000hsd.googl egroups.com...
Is there a way to make access ignore punctuation at the beginning of
an item, such as "Field and Stream" so that it will arrange all
information alphabetically instead of arranging items in quotes
alphabetically, and then arranging items not in quotes
alphabetically?
Thanks
Aaaack! One more thought ...
You could actually design an update query, using that function to "Find and
replace" all of the titles that had the quotation marks.
If you decide to do that, though ... please make a backup copy of your table
FIRST, so that I don't have to feel bad for telling you something that
results in disaster if it doesn't work correctly. :) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: HumanJHawkins |
last post by:
Hi,
I have a table of text. I need to search for whole words within this text...
For example, I need to be able to search for records that contain 'dog' but
not return 'hotdog' or 'dogma' for example.
I am doing this by throwing a space around both the records in the table and
the search word like this:
WHERE (' ' + Text + ' ') Like ('% ' + Search + ' %')
|
by: Lachlan Hunt |
last post by:
Hi,
I have recently downloaded and experemented with IBM HPR 3.0, and
Opera 8 with text-to-speech, and have come to realise some fairly
annoying issues regarding punctuation marks.
I've found, that when a punctuation mark occurs directly after an
element, both HPR and Opera 8 will read the punctuation mark.
For example, the following:
<p><abbr title="...">HTML</abbr> is an application of
|
by: Chris Leffer |
last post by:
Hi.
I am trying to define a regular expression that accepts letters and
punctuation characters. I read something about Posix where I could use
in order to accept all the punctuation characters, but I could
not find how to add this to my expression. My expression is a simple
. How can I make it accept all the punctuation characters also?
Regards,
|
by: Anat |
last post by:
Hi,
I need a little help on performing string manipulation:
I want to take a given string, and make certain words hyperlinks.
For example:
"Hello world, this is a wonderful day!"
I'd like the words world & and day to be hyperlinks, therefore
after my manipulation it should be:
"Hello <a href=...>world</a>, this is a wonderful <a href=...>day</a>!"
Using split method is not good, because splitting with regex each
punctuation mark causes...
|
by: watcher00 |
last post by:
Hi
I'm a complete newbie at Perl and i was wondering if i can get some help completing an exercise i've come across.
I need to count the punctuation marks from a text file and then output a list of all occurring punctuation marks with its frequency printed next to it.
eg
2 hyphens
3 commas
| |
by: jerger |
last post by:
i have a great program now with the help of a member from this site, but i need a little customization to meet the needs of non-english speakers... who might accidendtly type punctuation which would give a false negative dictionary response... so if the user types in:
i need uppercase to become lowercase too
what i would like is to remove commas, periods, exclamation points and question marks and apostrophes from the strings before it...
|
by: kdsutaia |
last post by:
hi!
i m trying to do something like this.
as I am doing tockenization. and wants to include all punctuation mark as tocken.
if($punctuation){
grep {$p =~ m/$_/' '.$_.' '/g)} ("\.", "\%", "\'", "\\", "\", "\{", "\}", "\"", "\>", "\?", "\<", "\#", "\~", "\=", "\&", "\*", "\,", "\!", "\@", "\$", "\(", "\)", "\+", "\-", "\_", "\|", "\:", "\;", "\.", "\/", "\$", "\@", "\-", "\'", "\``");
}
|
by: adelemb |
last post by:
Hi,
I have a bit of JavaScript for a Tell a Friend link. The person enters an email into a box clicks submit and their email programme opens a new mail with the URL from the referring page. My problem is that while some bits of the URL need replacing to make it work, others need to be left as they are.
The title for the pages are in the URL e.g. this page has the title "IDIOTS OR WHAT?!"...
|
by: Shiao |
last post by:
Hello,
I'm trying to build a regex in python to identify punctuation
characters in all the languages. Some regex implementations support an
extended syntax \p{P} that does just that. As far as I know, python re
doesn't. Any idea of a possible alternative?
Apart from manually including the punctuation character range for each
and every language, I don't see how this can be done.
Thank in advance for any suggestions.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |