Results 1 to 7 of 7

Thread: Colors

  1. #1
    Join Date
    Nov 2004
    Posts
    20

    Unanswered: Colors

    I have created a table called "Colors" with three fields (each with a number data type) - "Red", "Green" and "Blue". I need to know how or if it is possible to create a query which will output the actual color.

    Example:

    Table;

    RED GREEN BLUE
    255 170 0


    The subsequent query would then output the color "Amber", but as well as the text, output the physical color.

    If so, help would be much appreciated, thanks.

  2. #2
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    it would be possible, but you'd have to get data from somewhere (about which colours have which names), probably VB. However to show the colour ie not the name of the colour, is formating and you don't do that with queries so that will require VB code to format it
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  3. #3
    Join Date
    Nov 2004
    Posts
    20
    how would i go about doing this "formatting" then? could i do it using VB Express 2005? if so, where could i get this code or could any please supply me with it. I would be extremely grateful!

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    You appear to have spelt your Colour table name wrong

    Yeah - VBA cab't work out the names - you need to name every single combination of the RGB palette - unless someone out there in the world already has and you can use their data.

    To display the colour (on a form as m.timoney suggests) you could use something like:
    Code:
    Me.MyTextBox.BackColor = RGB(RedField, GreenField, BlueField)
    You could also mock your form up to look like a query if you need this in a table format.

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by Dave_is100
    VB Express 2005?
    What the heck is that?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Nov 2004
    Posts
    20
    VB Express is basically a free version of VB.Net 2005 which can be downloaded from the Microsoft website

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Well.... in that case it is a .NET issue really rather than an access one. Access in this case can only provide the data; .NET will need to handle the formatting. Before you rush off to the .NET forum though - what control are you using?
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •