Results 1 to 2 of 2
  1. #1
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,046

    Change DCount output (in unbound textbox) from, e.g., "0.6" to "60.0%"

    Hello Experts:



    On a form, I use various Dcounts to calculate n/N.

    For example, I have the following objects:
    - Table [tbl_Source] having 10 records.
    - Query "qry01_Complete" returns 6 records.
    - Query "qry02_Partially_Complete" returns 3 records.
    - Query "qry03_Not_Started_Yet" returns 1 record.

    Now, when you open up the form "F01_MainMenu", the following calculated values are displayed in the bright yellow textboxes:
    - 60.0%
    - 30.0%
    - 10.0%

    These percentages are calculated via the following Dcount expression for, e.g., the top yellow textbox:
    =FormatPercent(DCount("*","qry01_Complete")/DCount("*","tbl_Source"),1)

    Improved Display (Question):
    - I plan on changing the yellow background to match the dark blue background (with white font).
    - I will also attempt to somehow line up the unbound textboxes with the listbox so that it appears that the % are part of the listbox.
    - However, if you know of another/better way to somehow concatenate the % values into the listbox itself -- WITHOUT INTERFERING THEIR ROWSOURCE QUERY CALLS -- that would be even preferred. Any thoughts if that is somehow doable?

    Thank you,
    Tom

    P.S. See attached the DB and screenshot of the current Dcount outputs.
    Attached Thumbnails Attached Thumbnails Metrics.JPG  
    Attached Files Attached Files

  2. #2
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,046
    I merely changed the formatting and moved the % to the left of the listbox. This will certainly work. Thanks.

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

Similar Threads

  1. Replies: 8
    Last Post: 04-21-2021, 09:44 AM
  2. Simple table relationships ("faces" to "spaces" to "chairs")
    By skydivetom in forum Database Design
    Replies: 36
    Last Post: 07-20-2019, 01:49 PM
  3. Replies: 3
    Last Post: 04-20-2016, 02:50 PM
  4. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  5. Replies: 30
    Last Post: 09-27-2013, 01:34 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