?
Solved

The letter "I" is a problem?!

Posted on 2007-10-09
5
Medium Priority
?
210 Views
Last Modified: 2013-11-28
Access form question.  Any time the letter "I" is used as the first character in a search, an error occurs that says it can't move the focus to the control.  How do I avoid this?
0
Comment
Question by:JimFaull
5 Comments
 
LVL 7

Expert Comment

by:DiscoNova
ID: 20045572
Taking the wording of the question, I'm inclined to say: "don't use letter I as the first character in search" :)

But, realistically, could you be a bit more specific, what does "search" mean in this context?
0
 
LVL 77

Expert Comment

by:peter57r
ID: 20045598
Which version of Access?
Exactly how are you doing the search?
0
 

Author Comment

by:JimFaull
ID: 20045790
That's what I said, too!

To be more specific, I am using Access 2000 runtime.

Private Sub txtFindSong_Change()
    Dim ynBlank As Boolean
    Dim lngRet As Long
   
    Application.Echo False
   
    If Right(Me!txtFindSong.Text, 1) = " " Then
        ynBlank = True
    Else
        ynBlank = False
    End If
   
    Select Case Me!optSort
       Case 1 'Title
            Me!Title.SetFocus
        Case 2 'Key
            Me!Key.SetFocus
        Case 3 'BookName
            Me!txtField.SetFocus
    End Select
'   Me!txtFindSong.SetFocus
   
    If Len(Me!txtFindSong) > 0 Then
        DoCmd.FindRecord Me!txtFindSong, acStart, , acSearchAll, , acCurrent, True
    Else
        DoCmd.GoToRecord , , acFirst
    End If
   
    lngRet = fSetScrollBarPos(Me, Me.SelTop)
    Me!txtFindSong.SetFocus
   
    If ynBlank Then
        Me!txtFindSong = Me!txtFindSong & " "
    End If
   
    Me!txtFindSong.SelStart = Me!txtFindSong.SelLength + 1
   
    Application.Echo True

End Sub
0
 
LVL 77

Expert Comment

by:peter57r
ID: 20046966
Are you saying you only get the error when you use the runtime app or are you getting the same error when you are in the development machine as well (in which case which setfocus line is it failing on?)?
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 1000 total points
ID: 20214343
:JimFaull,

Set the "Allow Auto Correct" property of this textbox/combox to:
NO

Access thinks you are typing the Word "I" (First Person Singular).
So it tries to change "i" to "I"

HTH

Jeff Coachman
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have had my own IT business for a very long time. I started mostly with hardware and after about a year started to notice a common theme. I had shelves with software boxes -- Peachtree, Quicken, Sage, Ouickbooks -- and yet most of my clients were…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question