How to use this module?

  • Thread starter Thread starter Pic
  • Start date Start date
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top