P
Pic
A few years back, someone on this list provided me with the following
module, which takes a list of words and reverses them (ie, "word" is
changed to "drow").. The words exist in a one-field table, each row
of which contain one word. I used the module in a query and it worked
fine.
I haven't used it in a while until today, and now I get an error
message about a data type mismatch.
The module is called Reverse. The table is called Words. Can anyone
here explain how I can re-make the query?
Thanks in advance,
Pic
Option Compare Database
Option Explicit
Public Function Reverse(Source As String) As String
Dim x As String, I As Integer, L As Integer, Y As String
x = Source
L = Len(Source) + 1
For I = 1 To Len(x)
Mid$(x, I, 1) = (Mid$(Source, L - I, 1))
Next I
Reverse = x
End Function
module, which takes a list of words and reverses them (ie, "word" is
changed to "drow").. The words exist in a one-field table, each row
of which contain one word. I used the module in a query and it worked
fine.
I haven't used it in a while until today, and now I get an error
message about a data type mismatch.
The module is called Reverse. The table is called Words. Can anyone
here explain how I can re-make the query?
Thanks in advance,
Pic
Option Compare Database
Option Explicit
Public Function Reverse(Source As String) As String
Dim x As String, I As Integer, L As Integer, Y As String
x = Source
L = Len(Source) + 1
For I = 1 To Len(x)
Mid$(x, I, 1) = (Mid$(Source, L - I, 1))
Next I
Reverse = x
End Function