Results 1 to 3 of 3
  1. #1
    Rick5150 is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    16

    Display Text Only if Checkbox is Checked

    Is there a way that I can display text on a form when a checkbox is ticked?

    I have a customer order form where I have a checkbox to check if a customer cancels an order. I want big red letters to display ORDER CANCELLED across a certain area when the box is checked so it is very obvious. Can I do this?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Create the label wherever you want on the form and set its Visible property false. Then set the Visible property True in your CheckBox AfterUpdate event.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    You'll also need code in the Form_Current Event to keep the formatting appropriate when moving from Record-to-Record:
    Code:
    Private Sub CheckBoxName_AfterUpdate()
     Me.LabelName.Visible = Me.CheckBoxName
    End Sub
    
    Private Sub Form_Current()
     Me.LabelName.Visible = Nz(Me.CheckBoxName)
    End Sub


    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. If checkbox is checked, add X to a current value
    By INeedAboutTreeFiddy in forum Programming
    Replies: 4
    Last Post: 05-30-2012, 08:17 AM
  2. Replies: 22
    Last Post: 11-14-2011, 10:29 AM
  3. Text box width/bring to front and Checkbox
    By SorenIX in forum Programming
    Replies: 16
    Last Post: 06-22-2011, 06:07 PM
  4. Checkbox unable to display a tick
    By sabre1 in forum Access
    Replies: 0
    Last Post: 11-08-2010, 09:43 AM
  5. Checkbox controlling text box
    By chuckduarte in forum Forms
    Replies: 0
    Last Post: 10-21-2008, 10:45 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