[AccessD] Importing from Excel/Transpose

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Thu Jun 22 10:08:33 CDT 2006


Again, I'd use a bit of brute force DAO code since it's only seven fields:

openrecordset(targettable)
openrecordset(sourcetable)

targettable.addnew

targettable!field1=sourcetable!field
sourcetable.movenext
targettable!field2=sourcetable!field
sourcetable.movenext
targettable!field3=sourcetable!field
sourcetable.movenext
targettable!field4=sourcetable!field
sourcetable.movenext
targettable!field5=sourcetable!field
sourcetable.movenext
targettable!field6=sourcetable!field
sourcetable.movenext
targettable!field7=sourcetable!field
targettable.update

sourcetable.close
targettable.close

msgbox "Done!"

Not elegant but effective and only takes a few minutes to code.

HTH

Rocky


ewaldt at gdls.com wrote:
> I have information coming in from an Excel spreadsheet. There are 7 fields
> in a range, but they are arranged vertically, so Access imports them as 7
> records with a single field. What's the  most efficient manner of copying
> these into a regular Access table? That is, I import them into a temporary
> table, and then want to append them to a "real" one, which requires what in
> Excel would be called transposing.
>
> TIA.
>
> Thomas F. Ewald
> FCS Database Manager
> General Dynamics Land Systems
> (586) 276-1256
>
>
>
>
>
> This is an e-mail from General Dynamics Land Systems. It is for the intended recipient only and may contain confidential and privileged information.  No one else may read, print, store, copy, forward or act in reliance on it or its attachments.  If you are not the intended recipient, please return this message to the sender and delete the message and any attachments from your computer. Your cooperation is appreciated.
>   

-- 
Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com





More information about the AccessD mailing list