Results 1 to 10 of 10
  1. #1
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145

    Coloring Certain Fields when Auditing

    I have a database were there is a field called Item on 2 different forms and want to color the field a dark gray color when the order is audited the actual form names are below.
    Form 1 - frmProduction_Schedule_ByCPO
    Form 2 - frmProduction_Schedule_BySalesOrder
    Field name - Item
    I was thinking about putting an on click event that would color the item field so that people knew not to mess with that order.
    Click image for larger version. 

Name:	1.JPG 
Views:	11 
Size:	144.4 KB 
ID:	16824Click image for larger version. 

Name:	2.JPG 
Views:	11 
Size:	114.4 KB 
ID:	16825Click image for larger version. 

Name:	3.JPG 
Views:	11 
Size:	111.8 KB 
ID:	16826


    Any suggestions are all accepted Thanks!!!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    The short answer is, while in datasheet or continuous view, you cannot adjust a control's properties that will not display the same properties on another Row/Record.

    Having said that, I did see someone post a solution using continuous forms and I believe some crazy programming using OLE objects. I believe it was in the MSDN forums.

  3. #3
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    Instead of click event I would suggest to use form's current event.
    Pseudo code
    If Audited =True then
    code to grey out/disable controls
    else
    code to enable controls
    endif

  4. #4
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    What you need is conditional formatting on the field you want to highlight. Conditional formatting allows you to specify up to 3 different formats for a control, based on the values in that control or others (which don't have to be visible).

    In your case, you would apply conditional formatting to the Item field, but you will need a data field in each record to indicate the audit status.

    HTH

    John

  5. #5
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    When the order is audited the person that audited it has to click the check box which indicates an audit status?

  6. #6
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    Do you know the expression I would use?

  7. #7
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    can you write out the directions I have found and done conditional formatting before I just don't get what you mean about a data field in each record, when the audit button is pushed a date field comes up can that be used and how would I use it if possible???

  8. #8
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    I don't know if that's a question or a statement, but that's what it looks like.

    As long as the audit field behind the checkbox is in the order records, you can use conditional formatting.

    In form design view:

    - Click the "Item" field
    - Click the Format tab
    - Click the Conditional Formatting icon
    - Click New rule
    - From the dropdown on the left, select "Expression is"
    - In the box to the right, enter [Audit] = True (replace Audit with your actual field name
    - Set the formatting (colour, background, etc) you want to use
    - Save and close the form

    That is untested of course, but it should be close.

    John

  9. #9
    Z1nkstar's Avatar
    Z1nkstar is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    TX, USA
    Posts
    145
    Wow Thanks Work Perfectly..!!!!

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    And Access 2010 expanded from 3 to 50 conditions.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Coloring Buttons not working
    By justphilip2003 in forum Forms
    Replies: 8
    Last Post: 05-11-2013, 08:10 AM
  2. Auditing Programmatic Changes - Help!
    By scotiwis in forum Access
    Replies: 4
    Last Post: 11-06-2012, 09:32 AM
  3. Replies: 1
    Last Post: 09-10-2012, 01:57 PM
  4. Coloring a combobox as error message?!
    By Lidwina in forum Forms
    Replies: 1
    Last Post: 03-03-2011, 11:12 AM
  5. Auditing in Access Database
    By hannankhanji in forum Access
    Replies: 0
    Last Post: 03-01-2011, 05:21 AM

Tags for this Thread

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