Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Public Function gfgCompact(varText As Variant) As String
On Error GoTo Err_gfgCompact
Dim strText As String, strResult As String, strChar As String
Dim intPos As Integer, intReplace As Integer
Dim strReplace1 As String, strReplace2 As String, strRemove As String
strRemove = " ,?;.:/=+%*$[]&#'(?!{})?-_" & """"
strReplace1 = "àâ@éèêëçïöüùµ"
strReplace2 = "AAAEEEECIOUUU"
If Nz(varText) = "" Then
gfgCompact = ""
Else
strText = UCase(varText)
End If
For intPos = 1 To Len(strText)
If InStr(1, strRemove, Mid(strText, intPos, 1)) = 0 Then
strChar = Mid(strText, intPos, 1)
intReplace = Nz(InStr(1, strReplace1, strChar))
If intReplace > 0 Then
strChar = Mid(strReplace2, intReplace, 1)
End If
strResult = strResult & strChar
End If
Next intPos
gfgCompact = strResult
Exit_gfgCompact:
Exit Function
Err_gfgCompact:
Debug.Print Err.Number & " : " & Err.Description
Resume Exit_gfgCompact
End Function
Je wilt dus dat tijdens het typen in de textbox een kleine letter al direct naar een hoofdletter wordt veranderd?
Dat kan volgens mij alleen middels een stukje code in het KeyPress event.
Maar waarom zou je dat willen doen?
De hoofdletters staan er in zodra je het veld verlaat.
If Not Me.wat_te_zoeken.Text = vbNullString Then Me.wat_te_zoeken.Text = UCase(Me.wat_te_zoeken.Text)
Dim strSQL As String, zoekstring As String
zoekstring = "WHERE naam Like ""*" & Me.wat_te_zoeken & "*"""
strSQL = "SELECT NAAM, STRAAT, PLAATS, GEBOORTE, Rijksregisternummer FROM fiche "
strSQL = strSQL & IIf(zoekstring = vbNullString, "", zoekstring) & " ORDER BY NAAM, STRAAT "
With Me.naamlijst
.RowSource = strSQL
.Requery
'.SetFocus
'.Dropdown
en krijg "onvoldoende stackruimte" op de lijn met ".RowSource = strSQL"
End With
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.