Results 1 to 9 of 9
  1. #1
    trade605 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    3

    Post Create table in report and copy that table to clipboard


    This is kind of a complicated request, but I'm working on a project for work and essentially I have to choose two options and generate a report based upon those two options. Once this report is generated I need to be able to copy this table as is and paste it into autocad. I have a working copy of this in excel but I'm trying to port it over to our database at work so our employees can load up a form and generate the table right in the database like everything else they do. I have the form able to generate the report but I'm having troubles figuring out how to copy this report as is to be pasted into autocad. I would really appreciate some help on this because this is the last thing I have to figure out for this to work properly.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    How do you do this in Excel - manual copy/paste to AutoCAD?

    Report in ReportView (not PrintPreview) can be manually copy/pasted to Excel so I am guessing same for AutoCAD. However, not practical for complex report design.

    Have you considered AutoCAD connecting to Access database?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    trade605 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    3
    With the generator I have made in excel, they are able to manually copy and paste the cells with the generated info directly into autocad. That's essentially what I'm looking for. I have a report generated in report view that looks similar to a small table. From what I've tried I haven't been able to actually copy and paste this.

    Also - I wasn't aware I could link the database directly to autocad. I can look into this but I'm not as versed in autocad, as I'm IT so this may be more complicated but I'm not sure.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    So Access report copy/paste won't work with AutoCAD - same for query object? Might just be out of luck.

    Linking AutoCAD and Access not something I've done. As you said, it might be complicated. Review https://knowledge.autodesk.com/suppo...2B945-htm.html, http://www.tek-tips.com/faqs.cfm?fid=5800
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    Linking AutoCad to Access as suggested is probably the slickest way. In the event you can't, maybe you can use the OutPutTo or TransferSpreadsheet methods and use Excel as a go-between. It shouldn't be too hard to replicate the report data since it's really only a representation of a table or query anyway. Possibly problematic if you are filtering the report itself rather than restricting the data through a well designed query. Here's a link to the OutPutTo formats you can use. Not sure how up to date it is.

    https://msdn.microsoft.com/en-us/lib...mkGZuWCCuBvA)()
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by trade605 View Post
    This is kind of a complicated request, but I'm working on a project for work and essentially I have to choose two options and generate a report based upon those two options. Once this report is generated I need to be able to copy this table as is and paste it into autocad. I have a working copy of this in excel but I'm trying to port it over to our database at work so our employees can load up a form and generate the table right in the database like everything else they do. I have the form able to generate the report but I'm having troubles figuring out how to copy this report as is to be pasted into autocad. I would really appreciate some help on this because this is the last thing I have to figure out for this to work properly.
    Try using a form not a report.


    Try copying records from a sub form in continues or datasheet view (looks like excel).

  7. #7
    trade605 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    3
    So the problem I'm coming across with exporting to excel, which I've been trying to do. The output has to look like this example here. When exporting to excel it exports as the number of fields with the information listed underneath, so the formatting isn't brought with it. I haven't been able to find anything on how to resolve this issue (if it's even possible?).Click image for larger version. 

Name:	Screenshot (15).png 
Views:	12 
Size:	2.0 KB 
ID:	29009

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    So your options appear to be:

    1. AutoCAD link to Access

    2. intermediate step of export to Excel by either manual copy/paste report or report in PrintPreview can be exported to Excel or VBA manipulates Excel object and writes data to worksheet.
    Last edited by June7; 06-07-2017 at 01:49 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    Re: #2 - I tend to over-complicate things, which means I'd take the approach of looping through a recordset and writing to the workbook - probably to a named range (via Automation as I think June7 is suggesting). I don't know Excel vba half as well as Access vba, so I don't know if it's possible to copy to the clipboard and paste to the sheet. I've done the first method, but not the second.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Copy Table (All Rows and Fields) to Clipboard
    By kdbailey in forum Access
    Replies: 8
    Last Post: 02-17-2017, 09:17 AM
  2. Replies: 4
    Last Post: 11-01-2015, 11:46 AM
  3. How to Create local copy of linked Table
    By behnam in forum Programming
    Replies: 3
    Last Post: 11-20-2014, 05:49 PM
  4. Copy To Clipboard - Max Length?
    By fredz in forum Access
    Replies: 3
    Last Post: 05-31-2014, 02:03 PM
  5. Use VBA to copy table contents to the clipboard?
    By Deutz in forum Programming
    Replies: 3
    Last Post: 10-21-2010, 10:59 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums