Results 1 to 3 of 3
  1. #1
    benh is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2014
    Posts
    10

    Main page Form flashing button

    I have a button on my main page that is "Orders Ready To Invoice"

    clicking on that button opens up another form called [work completed]
    that is filtered by [work completed]![order has been shipped]=False

    that part all works fine, But I would like the button to change color if there is an order ready,


    or have the button be invisible if no orders are ready. anything really even a records counter
    next to button.

    I do have the main page running me.refresh on a timer interval,

    So what I'am asking for help on is how do I modify that button of main form by the amount
    of records available after filtering in another form.

  2. #2
    benh is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2014
    Posts
    10
    Well I added the counter and it seams to work...... If anyone knows how to modify a buttons attributes based on a number in a query that would be nice to know.

    thanks

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Maybe this will help.This worked for me:
    Code:
    'Private Sub Form_Timer()
    
        Dim RC As Boolean
        Me.Requery
        RC = Me.RecordsetClone.RecordCount <> 0
        Me.Command6.Enabled = RC
        ' or
        '    Me.Command6.Visible = RC
        'or
        'to change BG color
    '    If RC Then
    '        Me.Command6.BackColor = vbYellow
    '        Else
    '        Me.Command6.BackColor = RGB(196, 226, 197)  ' shade of green
    '    End If

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

Similar Threads

  1. Replies: 6
    Last Post: 08-20-2014, 06:43 PM
  2. Button in form to print 1st page of report
    By LonnieCAR in forum Reports
    Replies: 1
    Last Post: 05-29-2014, 09:08 AM
  3. Call a button on the main form from the subform
    By Grooz13 in forum Programming
    Replies: 1
    Last Post: 09-28-2011, 01:15 PM
  4. Replies: 0
    Last Post: 07-26-2010, 04:36 PM
  5. subclassing a form to control flashing
    By swt1951swt in forum Forms
    Replies: 0
    Last Post: 07-14-2009, 05:23 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