Results 1 to 7 of 7
  1. #1
    kdbailey is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    228

    Continuous Form command button visibility

    I'm creating a continuous form in which each record has a command button. The command button is hidden unless specific criteria is met. At this point I want the button to become visible, but only on that record.



    The code currently running makes the button visible on all records. Is there a way to make just the button on my current record appear?

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    I don't think so. Changing the appearance of a command button will change the appearance of all occurrences of the button, and conditional formatting doesn't apply to command buttons. You could make the button (in)visible in the form's On Current event, but again, that would affect all the records, not just the current one.

    About all you can do is put a check in the code behind the button to not do anything (or perhaps give a message) if the data doesn't allow it.

  3. #3
    kdbailey is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    228
    That's pretty much the response I was expecting. Thanks John_G

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Set the command button to Transparent=yes
    Add a field to your record source (e.g. Button:"Command")
    Add that field as a text box to your form
    Put it behind the command button, unavailable (but visible) to the user
    Do conditional formatting for that text box.

  5. #5
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,471
    You could maybe use conditional Formating with a text box can make control source = "Select" and change color or bold but not sure you can make visible/invisible. You can click OnClick on that box even though you won't have the mouse pointer. Other options is to have the button in the header but do what you need based on the record it is on.

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    No, you would have to change the font color to be the same as the background, bit difficult when you have alternating colors. Or use the enable rule rather than visible.

    Change the mouse pointer for the button to Hyperlink Hand (Cursor on Hover property).

  7. #7
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    OK, scrap all of what I said, it doesn't help! (Got it working on my side, then forgot to test it, rookie)

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

Similar Threads

  1. Replies: 11
    Last Post: 02-09-2016, 07:45 AM
  2. Replies: 3
    Last Post: 05-02-2015, 11:31 PM
  3. Control visibility on continuous form
    By GraeagleBill in forum Forms
    Replies: 4
    Last Post: 12-26-2014, 05:33 PM
  4. Continuous Form Disable Command Button
    By mbake085 in forum Programming
    Replies: 4
    Last Post: 05-27-2011, 08:55 AM
  5. Replies: 1
    Last Post: 07-27-2010, 02:27 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