DESCRIPTION:	One thing that always irritated me about auto-expand
		combo boxes was that the not-in-list could not be 
		configured to trigger on case typos, e.g. "SECurity" 
		being added to the record source when you meant "Security". 
		If you require, add the below event proc to the BeforeUpdate
		of a combo-box to 'fix' this.

NOTES:		2 considerations before using this are that
		a) The record set is small enough to permit transparent 
		   response times. This is not a problem in most cases as
		   auto-expand combos should never be used on large recorsets.
		b) The users should be able to turn it off.


'--Angus M Wood 100545,720
'--09:29  12/05/95



Sub cboSnipType_BeforeUpdate (Cancel As Integer)
'+
'
'    Parameters:    -
'
'    Description:   Correct Case-typos on the fly in combo-box, by comparing
'                   actual entry in field with stored record.
'
'-

    Dim dbCurrent As Database
    Dim rstTypes As Recordset
    Dim intCntr As Integer
    Dim strFieldContents As String

    '-- Get what has actually been typed in the field
    Me!cboSnipType.Selstart = 0
    Me!cboSnipType.SelLength = 15
    strFieldContents = Me!cboSnipType.SelText

    Set dbCurrent = CodeDB()
    Set rstTypes = dbCurrent.OpenRecordset("tbl_CodeSnippet_Types", DB_OPEN_DYNASET)

    '-- Check it is case-exact with what is in the table, or change it if not
    Do While Not rstTypes.EOF
        If CStr(rstTypes!txtSnipTypeName) = strFieldContents And Not StrComp(strFieldContents, rstTypes!txtSnipTypeName, 1) Then
            rstTypes.Edit
            rstTypes!txtSnipTypeName = strFieldContents
            rstTypes.Update
            
            rstTypes.Close
            Exit Sub

        End If
        rstTypes.MoveNext
    Loop

End Sub

