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 / Modules / DAO / VBA / September 2005

Tip: Looking for answers? Try searching our database.

transpose

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SimonW - 09 Sep 2005 17:57 GMT
Hi, sorry to be lazy!

Can anyone put their hands on a Function that transposes values in a
recordset into a variable i.e.

Last Name:
Davolio
Fuller
Leverling

str = Davolio, Fuller, Leverling, Peacock

Huge thanks if anyone can :-))
Douglas J. Steele - 10 Sep 2005 00:13 GMT
That's not transposition: it's concatenation.

See whether http://www.mvps.org/access/modules/mdl0008.htm (or
http://www.mvps.org/access/modules/mdl0004.htm) at "The Access Web" gives
you an idea of how to do it.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hi, sorry to be lazy!
>
[quoted text clipped - 9 lines]
>
> Huge thanks if anyone can :-))
'69 Camaro - 10 Sep 2005 00:26 GMT
Hi, Simon.

> Can anyone put their hands on a Function that transposes values in a
> recordset into a variable

One may concatenate the values in a field by using the function on the
following Web page:

http://www.mvps.org/access/modules/mdl0008.htm

If you would like to have commas separating the values instead of the
semicolon, then change the following line:

   lovConcat = lovConcat & lors(stFldToConcat) & "; "

to:

   lovConcat = lovConcat & lors(stFldToConcat) & ", "

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers.  Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.

> Can anyone put their hands on a Function that transposes values in a
> recordset into a variable

> Hi, sorry to be lazy!

i.e.

> Last Name:
> Davolio
[quoted text clipped - 4 lines]
>
> Huge thanks if anyone can :-))
SimonW - 10 Sep 2005 14:04 GMT
That's really helpful, thanks.  I ended up using FindFirst FindNext in a Do
While loop but would like to try your solution...

> Hi, Simon.
>
[quoted text clipped - 46 lines]
> >
> > Huge thanks if anyone can :-))
 
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.