Results 1 to 4 of 4
  1. #1
    dweekley is offline Advanced Beginner
    Windows XP Access 2002 (version 10.0)
    Join Date
    May 2010
    Posts
    52

    Working with Subform controls

    I have a subform set to continuous. Each record row has a button for opening comments specific to the record. This appears to be working fine. I would like to change the caption of the button if notes exist, otherwise no caption.

    I am using the following with the event Onload on the subform.

    If Len(txtESTOPSCMNTS & "") > 0 Then
    btnESTOPSCMNTS.Caption = "N"
    Else
    btnESTOPSCMNTS.Caption = ""


    End If

    I am thinking that every button's caption is changing because the code is not properly identifying the correct record?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Code like that won't work. Look at Conditional Formatting on the ribbon, though you'd have to use a textbox or label rather than a button.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    dweekley is offline Advanced Beginner
    Windows XP Access 2002 (version 10.0)
    Join Date
    May 2010
    Posts
    52
    Ha...I guess I need to stop using Access 2000

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    No different in later versions. Code to format record-by-record works in reports but not in forms.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 04-29-2017, 12:09 PM
  2. Puzzled - Form controls stop working
    By vad77 in forum Access
    Replies: 6
    Last Post: 03-31-2014, 10:21 AM
  3. Working with objects on tab controls
    By accessnewbie in forum Access
    Replies: 6
    Last Post: 03-19-2013, 02:26 PM
  4. Assigning controls not working
    By SemiAuto40 in forum Programming
    Replies: 5
    Last Post: 10-20-2011, 06:53 PM
  5. Replies: 1
    Last Post: 09-28-2009, 05:21 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