Results 1 to 4 of 4
  1. #1
    DavidMcA18 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2016
    Posts
    20

    Export to word - design issues

    https://www.techrepublic.com/blog/mi...h-access-data/



    I followed that link above to allow me to design a button to allow me to export to word quickly. I will use this for quotes etc. When i use this method it creates grey boxes around the exported data.

    1. Is there a better way to do this?

    2. If not, is there a way to format this better?


    Thanks

  2. #2
    DavidMcA18 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2016
    Posts
    20
    I have found a solution to this. Only issue is now...

    I have an auto number with a format like this "FP/"000"/18"

    When it try and use this to transfer to word only the single number comes up

    I.E. in the database it shows like FP/001/18

    on the word document it only shows as 1


    Any ideas?

  3. #3
    Minty is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    The number stored is 1, the format only applies to a display of the field on a report or access form.
    You can create the desired format string in a query by using;

    Code:
    MyNumber: "FP/" & [YourAutoNumber] & "/" & Format(Date(),"yy")
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You do know that using autonumbers like you are is a bad idea, right?

    See
    Autonumbers--What they are NOT and What They Are
    http://www.utteraccess.com/wiki/Autonumbers

    Under "What they are NOT", read #6 10 times. Then read Note #1 10 times.
    Uh.... You did know that an autonumber could go negative at any time?



    Highlights:
    1. Autonumbers are great, but you can not rely on the rows always having one contiguous series of numbers starting at 1 and incrementing by 1 to the number of rows in the table.


    2.
    The primary use of autonumbers should be as the PK of a table, and then as the PK side of PK/FK relationship links.


    3.
    Autonumbers should not be made visible to the users of the application.


    4.
    Unless you specify an ORDER BY clause (either in the select or query or form or report order by property or via a GROUP BY clause), you truly have no idea what order the rows will be returned to you, and if they happen to be delivered in the desired sequence, then you are lucky (today, but there are no guarantees about the future).


    5.
    If you want an ordered report, you must list the necessary fields to sort on, and autonumber fields are not considered to be good candidates for inclusion in this list.

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

Similar Threads

  1. Issues with Word File tab after Merge Started from VBA
    By drexasaurus in forum Programming
    Replies: 0
    Last Post: 07-28-2014, 10:32 AM
  2. Query Export formatting issues
    By jle0003 in forum Queries
    Replies: 1
    Last Post: 08-02-2013, 08:50 AM
  3. Export to Word
    By dagwood in forum Import/Export Data
    Replies: 1
    Last Post: 05-09-2013, 05:20 PM
  4. Export to Word
    By Monterey_Manzer in forum Import/Export Data
    Replies: 0
    Last Post: 12-20-2012, 02:06 PM
  5. Export to excel (File Name issues)
    By fpmsi in forum Import/Export Data
    Replies: 6
    Last Post: 09-22-2011, 02:09 PM

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