Converting Hex code to Access color Display
Posted on 2004-09-08
I have an Access Database and I need a little programming done. I have a field where a hex code is inputted, ie #000000 and I need Access to take that code and convert it into the appropriate color. Then display the color in a box. I have tried to do this, but I can't seem to get Access to display the appropriate color in the box. I know my vb is off somewhere, I just don't know where. Currently I have 3 main fields in use, a Color Name Field that is Unbound, a Color Code field that holds the Hex code, and the Color Number field, that should display the appropriate color that Access uses. I also have a box that is named ColorView, and it should display the information from the Color Number field. Everything works except the conversion from Hex to Number is wrong. For instance Now, if you input the Hex code of #0000FF you get the number 255 and the color Red. What you should get is the color Blue and the number 16711680. Please Help.