G
Gerard
To begin with, I choose: Modules/New and I paste:
Public Function GetLetters(strBookCode As String) As String
Dim lngCtr As Long
Const conAlphabet As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
For lngCtr = 1 To Len(strBookCode)
If InStr(conAlphabet, Mid(strBookCode, lngCtr, 1)) > 0 Then
GetLetters = GetLetters & Mid(strBookCode, lngCtr, 1)
End If
Next lngCtr
End Function
----End of Code-----
the English alphabet is like the Dutch alphabet, the problem cannot be
there.
I gave it the name "Letters".
The I go to the query screen, and I choose update query, and I place
GetLetters([BookCode])
in the update to field.
The I choose execute query (translated from dutch, so I don't know the
exact English wording), than it jumps to the VB screen, you see the
module again, with the message Compilermistake: (or something like
that),syntaxis fault or error.
When I click on this error-screen, the first line of the module becomes
yellow and gets an arrow.
When I want to leave the VB screen, you get the message: This interrupts
the process of fault finding (or something like that).
I can only shut down the program by :control alt delete.
That is the state of affairs, Klatuu.
What do you think of it?
Regards,
Gerard
Public Function GetLetters(strBookCode As String) As String
Dim lngCtr As Long
Const conAlphabet As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
For lngCtr = 1 To Len(strBookCode)
If InStr(conAlphabet, Mid(strBookCode, lngCtr, 1)) > 0 Then
GetLetters = GetLetters & Mid(strBookCode, lngCtr, 1)
End If
Next lngCtr
End Function
----End of Code-----
the English alphabet is like the Dutch alphabet, the problem cannot be
there.
I gave it the name "Letters".
The I go to the query screen, and I choose update query, and I place
GetLetters([BookCode])
in the update to field.
The I choose execute query (translated from dutch, so I don't know the
exact English wording), than it jumps to the VB screen, you see the
module again, with the message Compilermistake: (or something like
that),syntaxis fault or error.
When I click on this error-screen, the first line of the module becomes
yellow and gets an arrow.
When I want to leave the VB screen, you get the message: This interrupts
the process of fault finding (or something like that).
I can only shut down the program by :control alt delete.
That is the state of affairs, Klatuu.
What do you think of it?
Regards,
Gerard