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.

put other data from other fields into one field of the same table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim - 01 Sep 2005 14:28 GMT
I want to put data from other fields in a table into one field in the sam
table.  I guess I may have to use an array to store the whole data in the
table and put it in one field. There is no space is allowe between fields.
Thank you,T.
Klatuu - 01 Sep 2005 15:59 GMT
I can't imagine any good reason to do such a thing.  As long as the data is
in the table, you can retrieve it any way you want to.  However, if you must
do this, be aware the limit to a text field is 255 characters. A memo field
can store up to 65,535 characters.

You did not say whether the fields you want to combine are in the same
record with the destination field.  Also, how you code this will depend on
the  number of fields to combine.  If it is only a few, then

With MyRecordset
   .Edit
   !DestionationField = !Field1 & !Field2 & !Field3
   .Update
End With

If it is a large number of fields

Lets say we want to combine fields 3, 4, 9, 11, 12, 15 into field 2

strFldList = "03/05/09/11/12/15/"
With MyRecordset
   .Edit
   For x = 0 to .Fields.Count
       If Instr(strFldList,Format(x,"00/") <> 0 Then
           .Fields(2) = .Fields(2) & .Fields(x)
       End If
   Next x
End With

> I want to put data from other fields in a table into one field in the sam
> table.  I guess I may have to use an array to store the whole data in the
> table and put it in one field. There is no space is allowe between fields.
> Thank you,T.
Tim - 01 Sep 2005 17:27 GMT
I got it! I used the first case to coding. Thank you very much for your help!

> I can't imagine any good reason to do such a thing.  As long as the data is
> in the table, you can retrieve it any way you want to.  However, if you must
[quoted text clipped - 29 lines]
> > table and put it in one field. There is no space is allowe between fields.
> > Thank you,T.
 
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.