UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Ignore Diacritical Marks When Searching For Name, Access 2010    
 
   
baffled100
post Aug 24 2017, 12:31 PM
Post#1



Posts: 343
Joined: 10-December 12



Hi,

I have read many postings about diacritical marks and Access and have found them all to be a bit confusing to me. I have a combo box that a user types in a name and if the name exists in the database, it will display information for that name on the form. However, if someone types in a name without the diacritical mark (the names in our database include the diacritical mark), Access will not find it. Is there an easy way to get Access to ignore the diacritical mark so that if will find the name if typed in a lookup field without the mark?

code from After update property of combo box
Me.RecordsetClone.FindFirst "[ID] = " & Me![Combo67]
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
End If

Thank you!
Go to the top of the page
 
doctor9
post Aug 24 2017, 01:29 PM
Post#2


UtterAccess Editor
Posts: 17,913
Joined: 29-March 05
From: Wisconsin


baffled100,

The simplest solution is to NOT require the user to type in a name to search existing data. A simple solution is to use a combobox control (or a listbox control or even a continuous form) so the user can search the existing data directly rather than type and hope they spelled the name exactly right, diacritical marks or no. (i.e. "Does he spell his name Brian Smith, Bryan Smith or Brian Smythe"?)

Remember, when talking about making things "easy" you should focus on making things easy for the USER. Oftentimes a bit of hard work on the frontend makes things easier down the road. For example, you could create a table of characters that include diacritical marks and their equivalent alphabetical character. You could use this data to replace diacritical marks in the name with the generic non-marked characters, and populate a separate "simple search name" text field with the result if you insist on having the user type the name blindly (assuming they don't type/paste diacritical marks into the textbox, of course).

Hope this helps,

Dennis

--------------------
(;,;) Li'l Cthulu says: Please talk about what you're trying to do, as well as how you're doing it.
Changing your real table name to "Table1" and your real form name to "Form1" in your posts makes it more difficult to understand what's going on, not easier.
Guidelines for Posting Questions
Go to the top of the page
 
baffled100
post Aug 25 2017, 11:25 AM
Post#3



Posts: 343
Joined: 10-December 12



Thanks very much for your reply! I guess I'm not sure what you mean by using a combo box, list box or continuous form so the user can search the existing data directly.......I thought that was what my combo box was basically doing. As the user types the letters of the last name, they are narrowing down the choices in the drop down list of the combo box. You are correct that if they type in Smith, they will not find Smyth, but how is that avoided other than just typing in 'Sm'......

I understand what you are suggesting with the table of characters with diacritical marks......I'll try that.

Thank you!!
Go to the top of the page
 
doctor9
post Aug 25 2017, 02:20 PM
Post#4


UtterAccess Editor
Posts: 17,913
Joined: 29-March 05
From: Wisconsin


baffled100,

> I'm not sure what you mean by using a combo box, list box or continuous form so the user can search the existing data directly.......
> I thought that was what my combo box was basically doing.

Basically, it's called a "combo" box because it combines the ability to type with the ability to scroll through a list. Let's say you're looking for "Señor Wences". You could type "Se" and then click the drop-down arrow to look at the list, which has jumped forward to all of the entries that start with "Se" (assuming it's sorted alphabetically). The user can then easily scroll to and select "Señor Wences" without having to type the "ñ".

Hope this helps,

Dennis

--------------------
(;,;) Li'l Cthulu says: Please talk about what you're trying to do, as well as how you're doing it.
Changing your real table name to "Table1" and your real form name to "Form1" in your posts makes it more difficult to understand what's going on, not easier.
Guidelines for Posting Questions
Go to the top of the page
 
baffled100
post Sep 4 2017, 10:19 AM
Post#5



Posts: 343
Joined: 10-December 12



Thanks for your reply! Just getting back to this.... smile.gif Yes, your explanation is exactly what my combo box does, so I was confused why you were suggesting it. However, some users will copy and paste a name into the box, instead of typing a few letters at a time, and that's when there's a problem.

Still hoping to find the time to try the table of characters with diacritical marks!

Thanks very much!
Go to the top of the page
 
moke123
post Sep 4 2017, 04:02 PM
Post#6



Posts: 1,148
Joined: 26-December 12
From: Western Ma.,L.I.,N.Y.,Jupiter,Fl.



QUOTE
However, some users will copy and paste a name into the box, instead of typing a few letters at a time, and that's when there's a problem.


then dont let them.

go to Options > Current Database > Tool bar and ribbon options - and unselect "Allow default shortcut menus"

you can even let them know in the mouse down event

CODE
Private Sub Combo5_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

    If Button = acRightButton Then

        MsgBox "Pasting is prohibited!."

    End If

End Sub


you can also set the shortcuts to false in the form properties if you want to allow c&p elsewhere
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    12th December 2017 - 07:10 AM