Question: I have a table where the user can select a colour scheme for their database

```
ID | Colour     | SelectedScheme
---|------------|--------------
1  | 136,207,39 | Yes

```

Then on my form I have the following on the current events tab

```
Dim RGBcolor As Long
RBGcolor = DLookup("Colour", "SelectedScheme")
Me.boxheader.BackColor = RGB(RGBcolor)

```

but I'm getting the Argument not optional error. any idea?

Answer: 
Arguments of RGB function are numeric, not string, and there should be 3 of them:

```
RGB(136,207,39)

```

You are trying to pass one string argument.
You can use `Split` function for extracting color values from string:

```
Me.boxheader.BackColor = RGB(Split(RGBcolor,",")(0),Split(RGBcolor,",")(1),Split(RGBcolor,",")(2))

```
The `RGB()` function expects 3 numbers, but your code supplies a single string value. That is the cause of the *"Argument not optional"* compile error. 

Construct a new string which includes the `RGB()` function plus your string of numbers. Submit that new string to `Eval()` ...

```vb
Me.boxheader.BackColor = Eval("RGB(" & RBGcolor & ")")

```