Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2005

Tip: Looking for answers? Try searching our database.

How to use this module?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pic - 13 May 2005 13:56 GMT
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
Duane Hookom - 13 May 2005 14:11 GMT
Is it possible that any field values are Null?

Signature

Duane Hookom
MS Access MVP
--

>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
[quoted text clipped - 23 lines]
> Reverse = x
> End Function
Pic - 13 May 2005 14:27 GMT
That was the problem.  Thanks!

>Is it possible that any field values are Null?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.