Results 1 to 11 of 11
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Access Color Chart


    This is a Color Chart I put together.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,818
    Thank you for the submittal. However, I think the table is a bit messed up. Some field names don't seem appropriate to their content. The textbox color is not changing to match the specified color name. After adjusting field names, changed code to:

    Me.ColorPic.BackColor = RGB(Me!R, Me!G, Me!B)

    Also, query is not needed. Bind form directly to table.

    A report could show the colors in a continuous table and could be printed.
    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.

  3. #3
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Your welcome, I guess! I did not notice that.Just finished the thing, thought it was working. Your code gave me a error
    Run Time error 13 Type Mismatch.

    Thanks,

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,818
    I deleted the Hex field which had color names, renamed the other fields appropriatelly as Hex, R, G, B (Access code data is missing) and revised code works for me. The R, G, B data works but really should be number, not text, fields. A report would have to be opened in PrintPreview or direct to printer for code to execute:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.ColorPic.BackColor = RGB(Me!R, Me!G, Me!B)
    End Sub
    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.

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    No doubt, did not understand what you said.

    Guess I did not do something right. Mine does not work.
    Attached Thumbnails Attached Thumbnails ColorChart.jpg  

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,818
    The textboxes on the form show data in wrong fields. Did you fix the field names in table? Should have renamed as follows:

    Hex - delete
    R to Hex
    G to R
    B to G
    Access to B
    add new field if you want - Access
    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.

  7. #7
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Thanks, it is working. Leave it to me to try and help and not get it right.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,818
    You can edit the original post to replace the attachment and add a comment about that.
    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.

  9. #9
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Sorry for the bad design, it was well intended. Anyway, implement June's code and all is well. Now, to try and get this into a Report. FYI, adding the form to the report does not work.

  10. #10
    DatabaseMakers is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    London
    Posts
    12

    Colour tool

    Here's a colour tool that can help translating between ColorCode, RGB and Hex!~)
    Attached Files Attached Files

  11. #11
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Thanks, Pretty Cool.

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

Similar Threads

  1. MS Access Chart
    By Georgi in forum Forms
    Replies: 6
    Last Post: 11-11-2012, 08:15 AM
  2. Graph (Chart) - Set Color of Data Point with VBA
    By June7 in forum Programming
    Replies: 6
    Last Post: 10-18-2012, 03:14 PM
  3. Pie chart in Access 2007
    By specsol in forum Forms
    Replies: 2
    Last Post: 09-13-2012, 12:54 AM
  4. Using A Chart Web Part In An Access Web DB
    By nrgins in forum SharePoint
    Replies: 1
    Last Post: 07-31-2012, 05:14 AM
  5. Replies: 2
    Last Post: 07-12-2010, 05:39 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