Results 1 to 2 of 2
  1. #1
    abusaif is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Nov 2012
    Location
    Earth
    Posts
    39

    Conditional FontBold based on other control

    Good Morning,

    I have 2 controls [Item] and [PCno], I want [Item]'s font to be shown bold if [PCno]'s value is null.

    I tried this;

    If (Me.PCno = "") Then
    Me.Item.FontBold = True



    Else
    Me.Item.FontBold = False
    End If

    but nothing happens.

    Kindly help.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    suggest use conditional formatting rather than vba code which won't work as you expect in a continuous form.

    If the form is single then you can use vba code - this is a simpler code

    me.item.fontbold=nz(PCNo,"")=""

    however it may not be working because the event you have put the code in may not be triggered.

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

Similar Threads

  1. Conditional Formatting Based On Another Column
    By Rustin788 in forum Reports
    Replies: 3
    Last Post: 08-13-2014, 01:52 PM
  2. conditional formatting or control source?
    By Rujahin in forum Reports
    Replies: 3
    Last Post: 04-08-2014, 03:37 PM
  3. conditional msgbox in a control
    By raton in forum Forms
    Replies: 6
    Last Post: 03-29-2012, 09:43 AM
  4. Replies: 5
    Last Post: 03-14-2012, 08:32 PM
  5. Conditional Control Source
    By tylerg11 in forum Programming
    Replies: 4
    Last Post: 09-26-2011, 07:47 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