Results 1 to 2 of 2
  1. #1
    ResearchRN is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    St. Louis, Mo.
    Posts
    21

    Need a textbox to display the percent of steps completed on a form.


    I'm enrolling medical centers in a new multi-center database. There are a number of steps that must be completed before the center is enrolled in the project. I have a form that serves as a checklist. I want the textbox at the bottom of the form to display the percentage of steps completed. I guess you would have to count the number of fields on the form that are filled in, but I don't know how to do it.

    Thanks.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    In VBA, something like:

    Me.textbox = 0
    If Not IsNull(Me!field1) Then Me.textbox= Me.textbox + 1
    If Not IsNull(Me!Field2) Then Me.textbox = Me.textbox + 1
    ...

    The real trick is figuring out what event to put code into.

    How many fields are involved? An expression in textbox could be:

    =IIf(IsNull([field1]),0,1) + IIf(IsNull([field2]),0,1) + IIf(IsNull([field3]),0,1)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 14
    Last Post: 02-06-2014, 11:59 AM
  2. Replies: 7
    Last Post: 11-07-2011, 06:31 AM
  3. Replies: 5
    Last Post: 08-11-2011, 05:38 PM
  4. Percent in a table; entering it via a form
    By DecaturLady in forum Access
    Replies: 11
    Last Post: 08-04-2011, 07:16 AM
  5. Percent textbox unusual behaviour
    By Deutz in forum Forms
    Replies: 4
    Last Post: 06-05-2011, 06:46 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