Solved

Change format of form field control source

Posted on 2014-11-21
3
211 Views
Last Modified: 2014-11-21
I have this in the control source of a field on a form.

=[txtActualNeededPanelQty] & " Panels," & " Each " & [txtEachPanelWidthInInches] & " Inches in Width, " & [txtHeightInFeet] & " Feet in Height"

But the result, for example, is giving me:

9 Panels, Each 46.6666666666667 Inches in Width, 8 Feet in Height

I want the "46.6666666666667 " part of it to read "46.7" (three decimals rounded up) so the final result will be:

9 Panels, Each 46.667 Inches in Width, 8 Feet in Height

How do I change the control source to accomplish this?
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 50

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 40457946
That will be:

=[txtActualNeededPanelQty] & " Panels," & " Each " & Format([txtEachPanelWidthInInches], "0.000") & " Inches in Width, " & [txtHeightInFeet] & " Feet in Height"

/gustav
0
 

Author Comment

by:SteveL13
ID: 40458097
Nice.  Thanks.
0
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 40458215
You are welcome!

/gustav
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question