Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / May 2006

Tip: Looking for answers? Try searching our database.

Foreign characters in linked text file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Melanie O - 25 May 2006 22:21 GMT
How does one refer to foreign characters in VBA?  I am aware of
www.lookuptables.com and can see the characters in their various forms, but
how do I reference an extended ascii code in vba, with the intent to replace
it with an english character?

Thanks,
Melanie
JonWayn - 26 May 2006 08:09 GMT
use the ASC function. Each character has an ascii numeric value. If you are
doing a find/replace procedure, then naturally, you must know beforehand what
you are searching for and what you want to replace it with. That said, use
the website you mentioned to determine the ascii code for each foreign
character you expect your data to contain and, say you want to replace à,
which has an ascii code of 244, write code like:

If Asc(SomeFieldOrOtherValue) = 244 Then
   SomeFieldOrOtherValue = "a"
Endif

Hope that helps

> How does one refer to foreign characters in VBA?  I am aware of
> www.lookuptables.com and can see the characters in their various forms, but
[quoted text clipped - 3 lines]
> Thanks,
> Melanie
Melanie O - 26 May 2006 14:24 GMT
Jon,

Thanks for the prompt and informational answer.  One more thing...  Can you
help me alter my existing function to account for this foreign character: Æ?  
(146 in ascii.)  My function is
IIf([Description] Is Not Null,Replace([Description],<something to identify
Æ>,"AE"),"").

Description is a text field, variable length.

Thanks for the help,
Melanie

> use the ASC function. Each character has an ascii numeric value. If you are
> doing a find/replace procedure, then naturally, you must know beforehand what
[quoted text clipped - 16 lines]
> > Thanks,
> > Melanie
Douglas J Steele - 26 May 2006 14:43 GMT
IIf(IsNull([Description]), "", Replace([Description],Chr$(146), "AE"))

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Jon,
>
[quoted text clipped - 29 lines]
> > > Thanks,
> > > Melanie
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.