C
Cliff Lane
I have an application that allows the user to select fore and back ground
colors for command buttons. I use the dialog to select the colors and store
the value returned in the db as a string. For standard colors the db values
are "white" etc. For custom colors the values are "ff808040" etc.
When I try to load these values from the db and set the controls colors I am
getting an error. The statement is
control.forecolor = db.fields("forecolor").value
the error returned is
Specified cast is not Valid.
I have tried using ctype but it then tells me the cast is not allowed.
Am I storing the selected value in the db using the correct type?
How can I set these values
Cliff
colors for command buttons. I use the dialog to select the colors and store
the value returned in the db as a string. For standard colors the db values
are "white" etc. For custom colors the values are "ff808040" etc.
When I try to load these values from the db and set the controls colors I am
getting an error. The statement is
control.forecolor = db.fields("forecolor").value
the error returned is
Specified cast is not Valid.
I have tried using ctype but it then tells me the cast is not allowed.
Am I storing the selected value in the db using the correct type?
How can I set these values
Cliff