Results 1 to 3 of 3
  1. #1
    saffronbows is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    2

    Make table query retains /inherits fixed number formatting from parent table

    I have a table with fixed number format for several columns but when I write a make table query the resulting table looses the fixed number formatting. I know I could make formatting explicit in the columns of the make table query, by using format([expression], "fixed"), but there are almost one hundred queries that use the same table. I want the number formatting to persist / be retained / be inherited by the resulting table as it was in the source table. Can anyone help?

    Thank you

    James

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,426
    tables store data and that is a make table query can do. Formatting is a property and sql does not pass on properties (you will find the same if you export to excel or a .csv for example).

    Using the format function will convert a number to text, so your make table will create a text field.

    Personally I do not worry about what a number looks like until the user is actually going to see the data - typically a form, report or export to another file.

    The way round it is rather than using a make table, create the table how you require it (fixed, no of dp's, date formats, indexing etc) then run a query to delete any contents and then append rather than just a make table.

  3. #3
    saffronbows is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    2
    Thank you Ajax, this helps my understanding of SQL. The many child tables that result from the queries are used for mail merges, so formatting is essential. Text should be OK for these. Your delete query + append query solution is nice, but that means twice as many queries and an update to the macro that runs them.

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

Similar Threads

  1. Replies: 2
    Last Post: 10-26-2015, 06:14 AM
  2. Replies: 2
    Last Post: 02-17-2015, 01:01 PM
  3. Replies: 4
    Last Post: 10-01-2014, 03:59 PM
  4. Replies: 1
    Last Post: 03-11-2014, 11:30 AM
  5. Replies: 2
    Last Post: 10-27-2009, 07:09 AM

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