• Combining Fields in a Query, format Question (Access 97)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Combining Fields in a Query, format Question (Access 97)

    Author
    Topic
    #359600

    In the one table in this database there are 3 fields, Medication, Dose, Units. An example record would be: Epogen 10,000.00 Units. In the one query, we want to combine the three fields into one record, and have used the following expression:

    Expr1: [Table1]![Medication] & ” ” & [Table1]![Dose] & ” ” & [Table1]![Units]

    However, when the information is displayed, it displays the Dose without the comma and decimal places in the query, even though that shows up in the table itself (as in the table example above). Example of display in Query: Epogen 10000 Units

    Is there a way to get the formatting of that cell to still appear when it’s being concatenated?

    Thanks,

    Kelley

    Viewing 0 reply threads
    Author
    Replies
    • #539428

      Hi Kelley,
      Try this:
      Expr1: [Table1]![Medication] & ” ” & format([Table1]![Dose], “#,##0.00″) & ” ” & [Table1]![Units]
      and you should get what you want.
      Hope that helps.

      • #539440

        That did it! I just wasn’t sure if you could add the formatting in the expression, but now I know that you can. Thanks!!

    Viewing 0 reply threads
    Reply To: Combining Fields in a Query, format Question (Access 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: