Hi There,
I like to automate a function in my database.
I have an Objectbox(Foto) and A Textbox(Titel)
When I enter the Objectbox, the first letter in the textbox
must be selected, the focus must go to the objectbox, than the file-insert system must be opened
in the directory with the same letter as the first letter selected out of the textbox.
This is what i have:
Private Sub Foto_Enter()
Dim strSearch As String
Dim intWhere As Integer
Dim ctlTextToSearch As Control
' Get search string from user.
With Me!Titel
strSearch = ""
' Find string in text.
intWhere = InStr(.Value, strSearch)
If intWhere Then
' If found.
.SetFocus
.SelStart = intWhere - 1
.SelLength = 1
Else
' Notify user.
MsgBox "String not found."
End If
End With
End Sub
Please help!
I like to automate a function in my database.
I have an Objectbox(Foto) and A Textbox(Titel)
When I enter the Objectbox, the first letter in the textbox
must be selected, the focus must go to the objectbox, than the file-insert system must be opened
in the directory with the same letter as the first letter selected out of the textbox.
This is what i have:
Private Sub Foto_Enter()
Dim strSearch As String
Dim intWhere As Integer
Dim ctlTextToSearch As Control
' Get search string from user.
With Me!Titel
strSearch = ""
' Find string in text.
intWhere = InStr(.Value, strSearch)
If intWhere Then
' If found.
.SetFocus
.SelStart = intWhere - 1
.SelLength = 1
Else
' Notify user.
MsgBox "String not found."
End If
End With
End Sub
Please help!